persistence@glassfish.java.net

RE: urgent help needed

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Mon, 22 Jan 2007 15:14:45 -0500

Hello Vasantha,
    This is an issue with toplink-essentials packaged within the war you are deploying. You will need to place the topLink-essentials jar within the shared library of Tomcat and remove the jar from your war.
--Gordon

-----Original Message-----
From: Vasanthakumar [mailto:vasantha_at_hsenid.lk]
Sent: Friday, January 19, 2007 10:33 AM
To: persistence_at_glassfish.dev.java.net
Subject: urgent help needed


Hi all,
Can anybody help me on the following issue.

I am using Spring 2.0 with JPA and I am using Glassfish jars
toplink-essentials.jar + Spring jars

My testcases works fine but when I deploy the my Web application (JSF)
to tomcat 5.5.17 and I have copied
spring-tomcat-weaver.jar into /$CATALINA_HOME//server/lib
and edited the contex.xml

<Context path="/myWebApp" docBase="/my/webApp/location">
   <Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
           useSystemClassLoaderAsParent="false"/>

</Context>



But Still I get the following exception

Caused by: java.lang.IllegalArgumentException: Object: com.moota.clientprovisioning.data.SystemUser_at_177039 is not a known entity type.
        at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3198)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:192)
        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:585)
        at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:237)
        at $Proxy27.persist(Unknown Source)
        at com.moota.clientprovisioning.service.jpa.UserServiceImpl.createNewSystemUser(UserServiceImpl.java:36)
        at com.moota.clientprovisioning.client.web.AdminCareHandler.addNewUser(AdminCareHandler.java:91)
        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:585)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
        ... 37 more




Here
com.moota.clientprovisioning.data.SystemUser
 is my Entity class.



Please can anybody suggest how Can I fix this.


Cheers
Vasantha