persistence@glassfish.java.net

Re: urgent help needed

From: Michael Bouschen <Michael.Bouschen_at_Sun.COM>
Date: Fri, 19 Jan 2007 14:43:35 +0100

Hi Vasantha,

I'm not sure, but the error message looks like toplink-essentials cannot
find the persistence.xml listing all the entity classes. Could you
double check whether the persistence.xml is available in the tomcat
environment and whether it includes an the following entry in the
persistence-unit you are using:
<class>com.moota.clientprovisioning.data.SystemUser</class>

Regards Michael

> 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
>