persistence@glassfish.java.net

IllegalArgumentException not a known entity type

From: Gareth Llewellyn <gareth.llewellyn_at_excite.com>
Date: Tue, 6 Feb 2007 18:32:17 -0800 (PST)

This is similar to a previous post re toplink-essentials.jar being packaged
in a war rather than in the Tomcat shared lib directory HOWEVER I am
encountering the following "not a known Entity type" issue when running a
deployed EAR containing an application client jar, en ejb jar and an entity
jar - this is my version of the ex1-ee.ear sample application from the
Glassfish persistence pages.

Caused by: java.lang.IllegalArgumentException: Object:
com.shoelessjos.legend.entity.spacial.Galaxy_at_1f6b4df is not a known entity
type.
        at
oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3178)
        at
oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:170)
        at
com.sun.enterprise.util.EntityManagerWrapper.persist(EntityManagerWrapper.java:433)
        at com.shoelessjos.legend.ejb.SpacialBean.insert(SpacialBean.java:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
        at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
        at
com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
        ... 17 more

The point is that I've duplicated ex1-ee.ear and its components in my own
project using my own build script and am running the application client jar
against the deployed SpacialBean EJB. Why is it not "seeing" the entities I
have packaged in my entities.jar inside the ear (as per ex1-ee.ear - which
works perfectly by the way)? Have I packaged up my application client jar,
ejb jar, entities jar or ear incorrectly?

I'll attach the ear here so anyone else can asadmin deploy and retrieve the
application client jar then run it with appclient. I've been desperately
searching my project and experimenting with packaging and config to try and
figure out how I can screw up a simple modification to the very simple
ex1-ee.ear example, but I just can't figure it.

Someone out there please lend a hand and save my sanity!
(I'm using Sun App Server PE9 update 2 and JSE6 by the way - basically the
latest Sun releases at time of writing)

http://www.nabble.com/file/6290/legend.ear legend.ear
-- 
View this message in context: http://www.nabble.com/IllegalArgumentException-not-a-known-entity-type-tf3184552.html#a8838807
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.