8 Replies Latest reply: Jul 7, 2008 1:32 PM by obrienmi8 RSS

    Unable to get Transaction Manager in Jboss with Toplink-essentials

    saasira
      Hi!
      I'm trying deploy deply my toplink-essentials project on JBoss-4.2.1, but with little success...

      When the ejb jar is deployed it's not giving any error, but when the bean is requested in a jsp via a session bean ,
      I'm getting the following error .. :
      TestModel.jar-Model login successful
      03:35:47,463 ERROR [STDERR] javax.persistence.TransactionRequiredException: 
      Exception Description: No transaction is currently active
      03:35:47,464 ERROR [STDERR]     at oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionWrapper.throwCheckTransactionFailedException(EntityTransactionWrapper.java:70)
      03:35:47,464 ERROR [STDERR]     at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionWrapper.checkForTransaction(EntityTransactionWrapper.java:62)
      03:35:47,464 ERROR [STDERR]     at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.checkForTransaction(EntityManagerImpl.java:616)
      03:35:47,465 ERROR [STDERR]     at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.joinTransaction(EntityManagerImpl.java:646)
      03:35:47,465 ERROR [STDERR]     at org.jboss.ejb3.entity.ManagedEntityManagerFactory.getTransactionScopedEntityManager(ManagedEntityManagerFactory.java:183)
      03:35:47,465 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:182)
      03:35:47,465 ERROR [STDERR]     at com.prapansol.demos.service.SRServiceBean.persistEntity(SRServiceBean.java:76)
      03:35:47,465 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      03:35:47,465 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      03:35:47,465 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      03:35:47,466 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:585)
      03:35:47,466 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      03:35:47,466 ERROR [STDERR]     at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      03:35:47,466 ERROR [STDERR]     at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      03:35:47,466 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,466 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      03:35:47,466 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,466 ERROR [STDERR]     at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      03:35:47,467 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,467 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      03:35:47,467 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      03:35:47,467 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,467 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      03:35:47,467 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,467 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      03:35:47,467 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,467 ERROR [STDERR]     at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      03:35:47,468 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
      03:35:47,468 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,469 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      03:35:47,469 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,469 ERROR [STDERR]     at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      03:35:47,469 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      03:35:47,469 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
      03:35:47,469 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:184)
      03:35:47,469 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81)
      03:35:47,469 ERROR [STDERR]     at $Proxy80.persistEntity(Unknown Source)
      03:35:47,470 ERROR [STDERR]     at org.apache.jsp.oracleTest_jsp._jspService(oracleTest_jsp.java:135)
      03:35:47,470 ERROR [STDERR]     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      03:35:47,470 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      03:35:47,470 ERROR [STDERR]     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
      03:35:47,470 ERROR [STDERR]     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      03:35:47,470 ERROR [STDERR]     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      03:35:47,470 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      03:35:47,470 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      03:35:47,471 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      03:35:47,471 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      03:35:47,471 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      03:35:47,471 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      03:35:47,471 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      03:35:47,472 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      03:35:47,472 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      03:35:47,472 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      03:35:47,472 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      03:35:47,472 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      03:35:47,473 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      03:35:47,473 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      03:35:47,473 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      03:35:47,473 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      03:35:47,473 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      03:35:47,474 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      03:35:47,474 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)
      03:35:47,474 INFO  [STDOUT] TransactionStatus :  1
      03:35:47,475 ERROR [STDERR] javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
      03:35:47,476 ERROR [STDERR]     at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1394)
      03:35:47,476 ERROR [STDERR]     at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
      03:35:47,477 ERROR [STDERR]     at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
      03:35:47,477 ERROR [STDERR]     at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
      03:35:47,477 ERROR [STDERR]     at org.apache.jsp.oracleTest_jsp._jspService(oracleTest_jsp.java:137)
      03:35:47,486 ERROR [STDERR]     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      03:35:47,486 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      03:35:47,486 ERROR [STDERR]     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
      03:35:47,486 ERROR [STDERR]     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      03:35:47,486 ERROR [STDERR]     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      03:35:47,486 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      03:35:47,486 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      03:35:47,486 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      03:35:47,487 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      03:35:47,487 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      03:35:47,487 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      03:35:47,487 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      03:35:47,487 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      03:35:47,487 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      03:35:47,487 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      03:35:47,487 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      03:35:47,488 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      03:35:47,488 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      03:35:47,488 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      03:35:47,488 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      03:35:47,488 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      03:35:47,488 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      03:35:47,488 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      03:35:47,488 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)
      03:35:47,489 INFO  [STDOUT] TransactionStatus :  6
      In one of this forums threads , it is mentioned that :

      <font color="red"> <i> "TopLink requires that you set a ServerPlatform to integrate with JTA, if you do not set a ServerPlatform then TopLink will not be integrated with JTA, which is why a JTA commit would cause nothing to be written." </i></font>

      So, I tried with a custom JBossPlatform and JBossTransactionControlller classes and configured them in the persistence.xml file, but then the Error I got is :
       jboss.jca:name=jdbc/OracleDS,service=DataSourceBinding
      03:47:32,103 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
      03:47:32,121 WARN  [ServiceController] Problem starting service persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
      javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
      Exception Description: predeploy for PersistenceUnit [Model] failed.
      Internal Exception: java.lang.NullPointerException
              at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:615)
              at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:178)
              at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
              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.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy89.start(Unknown Source)
              at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
              at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:627)
              at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:351)
              at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy33.start(Unknown Source)
              at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
              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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
              at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
              at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
              at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
              at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy34.start(Unknown Source)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy9.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
      Exception Description: predeploy for PersistenceUnit [Model] failed.
      Internal Exception: java.lang.NullPointerException
              at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:212)
              ... 100 more
      Caused by: java.lang.NullPointerException
              at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:623)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:467)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:242)
              at oracle.toplink.essentials.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:97)
              at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.findClass(EntityManagerSetupImpl.java:395)
              at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:401)
              at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:307)
              at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:545)
              ... 99 more
      03:47:32,128 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
      03:47:32,128 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=TestModel.ear,jar=TestModel.jar,name=SRService,service=EJB3 with dependencies:
      03:47:32,128 INFO  [JmxKernelAbstraction]       persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
      03:47:32,144 INFO  [EJB3Deployer] Deployed: file:/u01/home/developer/jboss-4.2.1.GA/server/default/tmp/deploy/tmp13654TestModel.ear-contents/TestModel.jar
      03:47:32,156 INFO  [EARDeployer] Started J2EE application: file:/u01/home/developer/jboss-4.2.1.GA/server/default/deploy/TestModel.ear
      03:47:32,161 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- MBeans waiting for other MBeans ---
      ObjectName: persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
        State: FAILED
        Reason: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
      Exception Description: predeploy for PersistenceUnit [Model] failed.
      Internal Exception: java.lang.NullPointerException
        I Depend On:
          jboss.jca:service=DataSourceBinding,name=jdbc/OracleDS
        Depends On Me:
          jboss.j2ee:ear=TestModel.ear,jar=TestModel.jar,name=SRService,service=EJB3
      
      ObjectName: jboss.j2ee:ear=TestModel.ear,jar=TestModel.jar,name=SRService,service=EJB3
        State: NOTYETINSTALLED
        I Depend On:
          persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
        State: FAILED
        Reason: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
      Exception Description: predeploy for PersistenceUnit [Model] failed.
      Internal Exception: java.lang.NullPointerException
        I Depend On:
          jboss.jca:service=DataSourceBinding,name=jdbc/OracleDS
        Depends On Me:
          jboss.j2ee:ear=TestModel.ear,jar=TestModel.jar,name=SRService,service=EJB3
      Why is the TransactionManager not getting initialised?
      Am I doing some thing wrong?
      Waiting for help..
      Samba
        • 1. Re: Unable to get Transaction Manager in Jboss with Toplink-essentials
          saasira
          When I don't specify targer server platform, I'm not getting any error during deployment , but when the page is requested, the above error is thrown.....

          And If I specify the target server, then the error is as below..

          The EJB module is not getting deployed at all!


          Here is the persistence.xml file
          <?xml version="1.0" encoding="UTF-8" ?>
          <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                       version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
            
            <persistence-unit name="Model" transaction-type="JTA">
            <provider>oracle.toplink.essentials.PersistenceProvider </provider>  
          <!--  <provider> oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>   -->
            <jta-data-source>java:jdbc/OracleDS </jta-data-source>  
             <properties>
                  <property name="toplink.logging.level" value="FINEST"/>
                  <property name="toplink.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
                  <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@192.168.10.141:l521:devdb02"/>
                  <property name="toplink.jdbc.password" value="trainee123"/>
                  <property name="toplink.jdbc.user" value="traineeschema"/>
                  <property name="toplink.logging.exceptions" value="true"/>
                  <property name="toplink.logging.session" value="true"/>
                  <property name="toplink.target-database" value="Oracle"/>
             
                  <property name="toplink.server.platform.class.name" value="oracle.toplink.essentials.platform.server.jboss.JBossPlatform"/>  
               
               <!--   <property name="toplink.target-server" value="oracle.toplink.essentials.platform.server.jboss.JBossPlatform"/>   -->
                        
              <property name="toplink.external.transaction.controller.class.name" value="oracle.toplink.essentials.transaction.jboss.JBossTransactionController"/>    
                   
                   
             </properties>
           
          
          
           
            </persistence-unit>
          </persistence>
          Here is the error :
                   jboss.jca:name=jdbc/OracleDS,service=DataSourceBinding
          11:10:27,129 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
          11:10:27,153 WARN  [ServiceController] Problem starting service persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
          javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
          Exception Description: predeploy for PersistenceUnit [Model] failed.
          Internal Exception: java.lang.NullPointerException
                  at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:615)
                  at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:178)
                  at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           ................... .......................... ........................... ......................
           ................... .......................... ........................... ......................
           ................... .......................... ........................... ......................
           ................... .......................... ........................... ......................
          
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
          Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
          Exception Description: predeploy for PersistenceUnit [Model] failed.
          Internal Exception: java.lang.NullPointerException
                  at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:212)
                  ... 100 more
          Caused by: java.lang.NullPointerException
                  at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:623)
                  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                  at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:467)
                  at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
                  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
                  at java.lang.Class.forName0(Native Method)
                  at java.lang.Class.forName(Class.java:242)
                  at oracle.toplink.essentials.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:97)
                  at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.findClass(EntityManagerSetupImpl.java:395)
                  at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:401)
                  at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:307)
                  at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:545)
                  ... 99 more
          -.............  ..................... ................... .........................
          • 2. Re: Unable to get Transaction Manager in Jboss with Toplink-essentials
            saasira
            Hi!
            I'm able to make EJB 3.0 work with Hibernate as persistence Provider ...
            But the same is not happening with toplink as Persistence Provider

            The problem is ,I suppose failing to attatch JBossTansactionManager to the Toplink Transaction manager...

            And ho to do that?

            For Hibernmate,
            I added the following property in persistence.xml; file :
              <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>      
            But the same is not working for Tplonk:
              <property name="toplink.server.platform.class.name" value="oracle.toplink.essentials.platform.server.jboss.JBossPlatform"/>  
                 
                <property name="toplink.target-server" value="oracle.toplink.essentials.platform.server.jboss.JBossPlatform"/> 
                          
                <property name="toplink.external.transaction.controller.class.name" value="oracle.toplink.essentials.transaction.jboss.JBossTransactionController"/>   
            It's throwing the error I pposted above , The jar is not even getting deployed.

            How to make toplink associate with JBoss TransactionManager?

            Any ideas?

            Thanks in advance,
            Samba
            • 3. Re: Unable to get Transaction Manager in Jboss with Toplink-essentials
              saasira
              Hello friends,

              I'm trying all the available methods, but to no good!

              I tried to add a SessionCustoizer class in the persistence.xml as below :

              <property name="toplink.session.customizer" value="com.prapansol.demos.service.JBossTransactionConfigurator"/>

              And In the <i>"customize"</i> method of that class I added a SessionEventListener as below :
               public class     JBossTransactionConfigurator implements SessionCustomizer{
                         public void customize(Session session) {
                      
                       
                      session.getActiveSession().getEventManager().addListener(new    
              JBossSessionPreLoginListener());
                      
                  }
              }
                 
              And in the <i>"prelogin"</i> method of My SessionEvent Listener class , I added the Server platform, and JTATransactionController as shown below:
              public class JBossSessionPreLoginListener extends SessionEventAdapter{
                  public void preLogin(SessionEvent event) {
                      
                          Session session = event.getSession();
                          session.logMessage("Initializing JBossPlatform ......");
                          session.getLogin().setPlatformClassName("oracle.toplink.essentials.platform.server.jboss.JBossPlatform");
                          //session.getLogin().setUsesExternalTransactionController(true);
                          session.getLogin().useExternalTransactionController();
                          session.getActiveSession().logMessage("Initializing JBossTransaction Controller ......");
                          session.setExternalTransactionController(new JBossTransactionController());
                          session.getActiveSession().logMessage("Successfully Configured JBossTransactionController ....");
                          
                      }
              }
              But , I'm getting the error when the bean is requested from a JSP or a backing bean of JSF page:
               UnitOfWork(8650745)--Thread(Thread[http-127.0.0.1-8080-1,5,jboss])--TX binding to tx mgr, status=STATUS_ACTIVE
              11:23:14,923 ERROR [STDERR] java.lang.IllegalArgumentException: Object: com.prapansol.demos.model.Emp@a3aaf5 is not a known entity type.
              11:23:14,924 ERROR [STDERR]     at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3198)
              11:23:14,924 ERROR [STDERR]     at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:190)
              11:23:14,924 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:182)
              11:23:14,924 ERROR [STDERR]     at com.prapansol.demos.service.SRServiceBean.persistEntity(SRServiceBean.java:76)
              11:23:14,924 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              11:23:14,924 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              11:23:14,924 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              11:23:14,924 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:585)
              11:23:14,924 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
              11:23:14,924 ERROR [STDERR]     at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
              11:23:14,924 ERROR [STDERR]     at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
              11:23:14,924 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,924 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,925 ERROR [STDERR]     at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,925 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
              11:23:14,925 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,925 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,925 ERROR [STDERR]     at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
              11:23:14,925 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              11:23:14,926 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
              11:23:14,926 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:184)
              11:23:14,926 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81)
              11:23:14,926 ERROR [STDERR]     at $Proxy96.persistEntity(Unknown Source)
              11:23:14,926 ERROR [STDERR]     at org.apache.jsp.oracleTest_jsp._jspService(oracleTest_jsp.java:142)
              11:23:14,926 ERROR [STDERR]     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              11:23:14,926 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
              11:23:14,926 ERROR [STDERR]     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
              11:23:14,926 ERROR [STDERR]     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
              11:23:14,926 ERROR [STDERR]     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
              11:23:14,926 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              11:23:14,927 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              11:23:14,927 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
              11:23:14,927 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
              11:23:14,927 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              11:23:14,927 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
              11:23:14,927 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              11:23:14,927 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
              11:23:14,928 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              11:23:14,928 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)
              11:23:14,930 INFO  [STDOUT] [TopLink Finer]: 2007.11.11 11:23:14.929--UnitOfWork(8650745)--Thread(Thread[http-127.0.0.1-8080-1,5,jboss])--TX afterCompletion callback, status=ROLLEDBACK
              11:23:14,930 INFO  [STDOUT] [TopLink Finer]: 2007.11.11 11:23:14.930--UnitOfWork(8650745)--Thread(Thread[http-127.0.0.1-8080-1,5,jboss])--release unit of work
              11:23:14,930 INFO  [STDOUT] [TopLink Finer]: 2007.11.11 11:23:14.930--UnitOfWork(8650745)--Thread(Thread[http-127.0.0.1-8080-1,5,jboss])--initialize identitymaps
              11:23:14,931 INFO  [STDOUT] [TopLink Finer]: 2007.11.11 11:23:14.931--ClientSession(21410136)--Thread(Thread[http-127.0.0.1-8080-1,5,jboss])--client released
              
              
                
              It seems the toplink entitiyManager is still not recognizing the entities created ... or may be they were not created as the Warning Messages displayed at the deployment time indicate :
              ServerSession(26489568)--Thread(Thread[main,5,jboss])--property=toplink.orm.throw.exceptions; default value=true
              11:22:56,899 INFO  [STDOUT] [TopLink Finer]: 2007.11.11 11:22:56.899--ServerSession(26489568)--Thread(Thread[main,5,jboss])--Searching for default mapping file in file:/u01/home/developer/jboss-4.2.1.GA/server/default/tmp/deploy/tmp51731TestModel.ear-contents/TestModel.jar
              11:22:56,909 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.909--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.model.Emp. The class is ignored.
              11:22:56,911 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.910--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.model.Dept. The class is ignored.
              11:22:56,913 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.912--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.model.Dept. The class is ignored.
              11:22:56,914 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.913--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.model.Emp. The class is ignored.
              11:22:56,915 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.914--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.service.SRServiceBean. The class is ignored.
              11:22:56,916 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.915--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.service.JBossTransactionConfigurator. The class is ignored.
              11:22:56,917 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.916--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.service.SRService. The class is ignored.
              11:22:56,918 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.918--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.service.SRServiceLocal. The class is ignored.
              11:22:56,919 INFO  [STDOUT] [TopLink Warning]: 2007.11.11 11:22:56.919--Thread(Thread[main,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.prapansol.demos.service.JBossSessionPreLoginListener. The class is ignored.
              11:22:56,925 INFO  [STDOUT] [TopLink Finest]: 2007.11.11 11:22:56.925--ServerSession(26489568)--Thread(Thread[main,5,jboss])--end predeploying Persistence Unit Model; state Predeployed; factoryCount 1
               creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
              11:22:56,950 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=TestModel.ear,jar=TestModel.jar,name=SRService,service=EJB3 with dependencies:
              11:22:56,950 INFO  [JmxKernelAbstraction]       persistence.units:ear=TestModel.ear,jar=TestModel.jar,unitName=Model
              11:22:56,984 INFO  [EJBContainer] STARTED EJB: com.prapansol.demos.service.SRServiceBean ejbName: SRService
              11:22:57,005 INFO  [EJB3Deployer] Deployed: file:/u01/home/developer/jboss-4.2.1.GA/server/default/tmp/deploy/tmp51731TestModel.ear-contents/TestModel.jar
              11:22:57,010 INFO  [EARDeployer] Started J2EE application: file:/u01/home/developer/jboss-4.2.1.GA/server/default/deploy/TestModel.ear
              11:22:58,179 INFO  [EARDeployer] Init J2EE application: file:/u01/home/developer/jboss-4.2.1.GA/server/default/deploy/UserInterface.ear
              11:22:59,054 INFO  [TomcatDeployer] deploy, ctxPath=/UI, warUrl=.../tmp/deploy/tmp51732UserInterface.ear-contents/UserInterface-exp.war/
              11:23:03,302 INFO  [EARDeployer] Started J2EE application: file:/u01/home/developer/jboss-4.2.1.GA/server/default/deploy/UserInterface.ear
              11:23:03,509 INFO  [EARDeployer] Init J2EE application: file:/u01/home/developer/jboss-4.2.1.GA/server/default/deploy/bc4j.ear
              11:23:04,266 WARN  [DeployerInterceptorJSE] Cannot load servlet class: oracle.jbo.server.emd.EMDServlet
               deploy, ctxPath=/webapp, warUrl=.../tmp/deploy/tmp51733bc4j.ear-contents/webapp-exp.war/
              11:23:04,459 WARN  [TomcatDeployer] Failed to setup clustering, clustering disabled. NoClassDefFoundError: org/jgroups/blocks/MethodCall
              11:23:04,478 INFO  [EARDeployer] Started J2EE application: file:/u01/home/developer/jboss-4.2.1.GA/server/default/deploy/bc4j.ear
              11:23:04,635 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
              11:23:04,795 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
              Why does the entitymanager not create the entities?
              Any hint as to what is causing this, or How to proceed further?

              Thanks and regards,
              Samba
              • 4. Re: Unable to get Transaction Manager in Jboss with Toplink-essentials
                608685
                Hi saasira,
                I'm facing the same problems as you trying to make JBoss 4.2.1 running toplink instead of hibernate as JPA provider.

                Basicly I end up with a TOPLINK-7060 exception telling me "javax.naming.InvalidNameException: Not a compound name: OracleDS" where my data source is "java:/OracleDS" in the oracle-ds.xml file. If I try to change the name I get a "javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException" message in the log.

                As I haven't found any real good documentation nor postings on the net I have to go back to hibernate, unless someone has some good hints or answers.

                Regards,
                Martin
                • 5. Re: Unable to get Transaction Manager in Jboss with Toplink-essentials
                  james_sutherland
                  There seem to be several issues here, the main one is caused by a class loader issue in JBoss's EJB3 support. The Glassfish bug for this is here,

                  https://glassfish.dev.java.net/issues/show_bug.cgi?id=3721

                  But you should also log the bug with JBoss because it prevents any JPA provider that uses weaving from working. I do not know of a workaround.

                  I'm not sure how you are getting to the other issues. To set the transaction controller you should be able to set the persistence.xml "toplink.target-server" option.

                  For the DataSource issue, you may need to configure the JNDI lookup type in TopLink, although if you have your target-server set it should just work.

                  You may need to use a SessionCustomizer and configure the JNDIConnector lookupType (STRING_LOOKUP) in the Session's login's connector.
                  • 6. Re: Unable to get Transaction Manager in Jboss with Toplink-essentials
                    obrienmi8
                    Hi, for the first issue mentioned by James referring to bug 3721 concerning JBoss EJB3 classLoader support, a workaround fix has been submitted in EclipseLink for the secondary NPE.

                    EclipseLink is the persistence provider for Glassfish M3.
                    See
                    https://bugs.eclipse.org/227630
                    https://bugs.eclipse.org/bugs/attachment.cgi?id=96619&action=diff

                    ..as a workaround to JIRA EJBTHREE-572 in
                    http://jira.jboss.com/jira/browse/EJBTHREE-572

                    Thank you for raising this issue.
                    /michael
                    • 7. Re: Unable to get Transaction Manager in Jboss with Toplink-essentials
                      643648
                      Hi, this workaround suggested here to fix the TopLink Essentials NPE problem in JBoss 4.2 is not clear to me.

                      Is the woprkaround available for the current TopLink Essentials implementation or is this for EclipseLink?

                      I am using the TopLink essentials jar file that comeswith JDev 10.1.3 and I need a workaround for this, not EclipseLink. Is there a soluition avilable?

                      Just for background - I'm getting the same problem as mentioned when using Toplink Essentials with JBoss 4.2 and no entities are deployed. I get the following message during startup:

                      21:45:16,796 INFO [PersistenceUnitDeployment] Starting persistence unit persist
                      ence.units:ear=OrderApp.ear,jar=OrderEJB.jar,unitName=DataModel
                      21:45:17,093 INFO [STDOUT] [TopLink Warning]: 2008.07.05 09:45:17.078--java.lan
                      g.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor t
                      o load class com.order.datamodel.Login. The class is ignored.
                      • 8. Re: Unable to get Transaction Manager in Jboss with Toplink-essentials
                        obrienmi8
                        Hi,
                        The workaround/fix for the this NPE thrown by the JBoss UCL3 ClassLoader is only in EclipseLink and TopLink.

                        See
                        https://bugs.eclipse.org/bugs/attachment.cgi?id=98504&action=diff

                        This fix involves using the real JBoss classLoader instead of the temporary UCL3 one and introducing JPAClassLoaderHolder to hold either one - since a loadClass on a real JBoss classloader will preclude using dynamic weaving until EJBTHREE-572 is fixed - this will require that in addition to this code you...

                        1) statically weave entity classes before EAR packaging and deployment
                        2) state the JBoss platform in your persistence unit...

                        <property name="eclipselink.target-server" value="JBoss"/>

                        There is a tutorial on migrating the JBoss published Hibernate JPA example to EclipseLink JPA that should help with how to do this.

                        http://wiki.eclipse.org/EclipseLink/Examples/JPA/Migration/JBoss


                        For GlassFish 2:
                        I am sorry the fix is not ported to essentials for issue# 3721 as EclipseLink will be the RI for JPA2.0 and will be the default JPA provider in GlassFish V3 going forward.

                        http://blogs.sun.com/theaquarium/entry/eclipselink_in_glassfish_v3_as
                        https://glassfish.dev.java.net/issues/show_bug.cgi?id=3721

                        thank you
                        /michael