Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Probelm in using Toplink to persist entities in JBoss enviroment

 
Amit Chauhan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All ,
I am using JBOss 4.2.0 server and toplink aling with Oracle 10g to persist the entity bean and on deployment I get this warning :


12:39:16,187 INFO [STDOUT] [TopLink Warning]: 2007.07.05 12:39:16.125--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class src.Employee. The class is ignored.
12:39:16,187 INFO [STDOUT] [TopLink Warning]: 2007.07.05 12:39:16.187--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class src.FirstSessionBean. The class is ignored.


I guess , perhaps because of this problem later on making a call to persist the entities I get this error as :


12:42:35,640 ERROR [STDERR] java.lang.RuntimeException: url = [file:/C:/jboss-4.2.0.GA/server/default/tmp/persist.jar]
12:42:35,640 ERROR [STDERR] at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getClassNamesFromURL(PersistenceUnitProcessor.java:272)
12:42:35,640 ERROR [STDERR] at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.buildClassSet(PersistenceUnitProcessor.java:181)
12:42:35,640 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:124)
12:42:35,640 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:226)
12:42:36,203 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:242)
12:42:36,203 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:278)
12:42:36,203 ERROR [STDERR] at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:81)
12:42:36,203 ERROR [STDERR] at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:119)
12:42:36,203 ERROR [STDERR] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
12:42:36,203 ERROR [STDERR] at src.FirstSessionBean.sayHello(FirstSessionBean.java:21)
12:42:36,203 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:42:36,203 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
12:42:36,203 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
12:42:36,203 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
12:42:36,203 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
12:42:36,203 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:278)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:79)
12:42:36,203 ERROR [STDERR] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:70)
12:42:36,218 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:42:36,218 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
12:42:36,218 ERROR [STDERR] at $Proxy71.sayHello(Unknown Source)
12:42:36,218 ERROR [STDERR] at TestServlet.doPost(TestServlet.java:79)
12:42:36,218 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
12:42:36,218 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:42:36,218 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
12:42:36,218 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
12:42:36,218 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
12:42:36,218 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
12:42:36,218 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
12:42:36,218 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
12:42:36,218 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
12:42:36,218 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
12:42:36,218 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)



Please can anybody be kind enough to bring me out of this problem . I am badly stuck.
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think someone else had this same problem recently.

The problem is that the JBoss container does not correctly implement the pluggability contract. You can go ahead and use application-managed Entity Managers if you ignore these errors and just create the EntityManagerFactory using Persistence.createEntityManagerFactory, etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic