6 Replies Latest reply on Feb 7, 2006 5:15 AM by Pieter-Jan Malfait

    entity manager not working on RC4

    Quande Ren Newbie

      Hi, There,


      I have a ejb jar file works fine with RC3, but it failed with the RC4.


      My persistence.xml is like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence>
       <persistence-unit name="mydb">
       <jta-data-source>java:/OracleDS</jta-data-source>
       <properties>
       <property name="hibernate.hbm2ddl.auto" value="update"/>
       </properties>
       </persistence-unit>
      </persistence>
      



      My datasource file is like this:
      <?xml version="1.0" encoding="UTF-8"?>
      <datasources>
       <local-tx-datasource>
       <jndi-name>OracleDS</jndi-name>
       <connection-url>jdbc:oracle:thin:@rqd1:1521:oracle</connection-url>
       <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
       <user-name>development</user-name>
       <password>quande</password>
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
       <metadata>
       <type-mapping>Oracle8</type-mapping>
       </metadata>
       </local-tx-datasource>
      </datasources>
      


      In my stateless session bean, I have the code like this:
       @PersistenceContext(unitName="mydb")
       private EntityManager manager;
      


      I get error like this:

      01:32:00,875 INFO [JmxKernelAbstraction] installing MBean:jboss.j2ee:service=EJB3,jar=ejb-lf.ejb3,name=SessionFacadeImpl with dependencies:
      01:32:00,875 INFO [JmxKernelAbstraction] persistence.units:jar=ejb-lf.ejb3.jar,unitName=mydb
      01:32:00,875 INFO [EJB3Deployer] Deployed: file:/C:/JavaApp/jboss-4.0.3SP1/serv
      er/all/deploy/ejb-lf.ejb3
      01:32:00,906 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
      loy/jmx-console.war/
      01:32:01,125 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- MBeans waiting for other MBeans ---
      ObjectName: persistence.units:jar=ejb-lf.ejb3.jar,unitName=mydb
       State: FAILED
       Reason: java.lang.reflect.InvocationTargetException
       I Depend On:
       jboss.jca:service=DataSourceBinding,name=OracleDS
       Depends On Me:
       jboss.j2ee:service=EJB3,jar=ejb-lf.ejb3,name=SessionFacadeImpl
      
      ObjectName: jboss.j2ee:service=EJB3,jar=ejb-lf.ejb3,name=SessionFacadeImpl
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:jar=ejb-lf.ejb3.jar,unitName=mydb
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: persistence.units:jar=ejb-lf.ejb3.jar,unitName=mydb
       State: FAILED
       Reason: java.lang.reflect.InvocationTargetException
       I Depend On:
       jboss.jca:service=DataSourceBinding,name=OracleDS
       Depends On Me:
       jboss.j2ee:service=EJB3,jar=ejb-lf.ejb3,name=SessionFacadeImpl
      


      If I change this code like this
       @PersistenceContext //without the unitName
       private EntityManager manager;
      


      Still get the same error.

      I am wandering what is the usage of the name in the <persistence-unit name="mydb">

      Also the page at docs\tutorial\entity\entity.html has words like this:

      you will probably need to define a hibernate.properties file in the META-INF directory of the JAR. hibernate.properties is needed if you need to hook in a datasource other than JBoss's DefaultDS, or change the caching of Hibernate.


      Is it possible that somebody provide a working example for oracle or other datasource?

      Any help is greatly appreciated.

        • 1. Re: entity manager not working on RC4
          Bill Burke Master

          What is the InvocationTargetException in question? Can you provide the stack trace please?


          --- MBeans waiting for other MBeans ---
          ObjectName: persistence.units:jar=ejb-lf.ejb3.jar,unitName=mydb
          State: FAILED
          Reason: java.lang.reflect.InvocationTargetException
          I Depend On:
          jboss.jca:service=DataSourceBinding,name=OracleDS
          Depends On Me:
          jboss.j2ee:service=EJB3,jar=ejb-lf.ejb3,name=SessionFacadeImpl



          • 2. Re: entity manager not working on RC4
            Quande Ren Newbie

            The stack trace says: No identifier specified for entity: com.lawforms.lf.ejb.clientorder.FieldValue.

            But I do have it.

            Here is my code

            @IdClass(FieldValuePK.class)
            @Entity
            @Table(name = "FieldValue")
            public class FieldValue extends EntityBase {
            


            Here is the error
            11:41:30,453 INFO [EntityBinder] Bind entity com.lawforms.lf.ejb.clientorder.FieldValue on table FieldValue
            11:41:30,453 WARN [ServiceController] Problem starting service persistence.units:jar=ejb-lf.ejb3.jar,unitName=mydb
            java.lang.reflect.InvocationTargetException
             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:97)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
             at sun.reflect.GeneratedMethodAccessor2.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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:428)
             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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy57.start(Unknown Source)
             at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:76)
             at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:608)
             at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:452)
             at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
             at sun.reflect.GeneratedMethodAccessor2.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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:428)
             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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy27.start(Unknown Source)
             at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:365)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at sun.reflect.GeneratedMethodAccessor16.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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy9.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:19
            2)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
             at sun.reflect.GeneratedMethodAccessor2.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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:428)
             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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy4.start(Unknown Source)
             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
             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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy5.deploy(Unknown Source)
             at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
             at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
             at org.jboss.Main.boot(Main.java:187)
             at org.jboss.Main$1.run(Main.java:438)
             at java.lang.Thread.run(Thread.java:595)
            Caused by: org.hibernate.AnnotationException: No identifier specified for entity: com.lawforms.lf.ejb.clientorder.FieldV
            alue
             at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:550)
             at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:276)
             at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:210)
             at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:997)
             at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:722)
             at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:161)
             at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:567)
             at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245)
             at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108)
             at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:231)
             ... 123 more
            11:41:30,812 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,jar=ejb-lf.ejb3,name=SessionFacadeIm
            pl with dependencies:
            




            • 3. Re: entity manager not working on RC4
              Nic Holbrook Newbie

              Ive got the same thing happening. Here's my stack trace.

              I'm running JBOSS4.0.4 from cvs. I had to use the thirdparty hibernate libs from jboss-head to get it to build because there were changes to the ejb3 module files that wouldn't compile.


              ---------------------------------------------------------------------------------------------------------

              2006-02-02 12:02:14,228 DEBUG [org.hibernate.impl.SessionFactoryImpl] obtaining JTA TransactionManager
              2006-02-02 12:02:14,228 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
              2006-02-02 12:02:14,231 DEBUG [org.hibernate.impl.SessionFactoryImpl] Checking 5 named HQL queries
              2006-02-02 12:02:14,231 DEBUG [org.hibernate.impl.SessionFactoryImpl] Checking named query: SecUser.findByGroupId
              2006-02-02 12:02:14,232 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed persistence.units:ear=security-deploy-1.0-SNAPSHOT.ear.ear,unitName=SecurityEM
              java.lang.reflect.InvocationTargetException
              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:97)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              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.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor10.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:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
              at $Proxy133.start(Unknown Source)
              at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:76)
              at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:599)
              at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:452)
              at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              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.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor10.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:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
              at $Proxy29.start(Unknown Source)
              at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:365)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
              at sun.reflect.GeneratedMethodAccessor42.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:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
              at $Proxy8.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:504)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:218)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:197)
              Caused by: java.lang.NoClassDefFoundError: antlr/ANTLRException
              at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:35)
              at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:72)
              at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54)
              at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
              at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:363)
              at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:327)
              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:414)
              at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:575)
              at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245)
              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108)
              at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:260)
              ... 80 more
              2006-02-02 12:02:14,235 WARN [org.jboss.system.ServiceController] Problem starting service persistence.units:ear=security-deploy-1.0-SNAPSHOT.ear.ear,unitName=SecurityEM
              java.lang.reflect.InvocationTargetException
              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:97)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              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.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor10.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:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
              at $Proxy133.start(Unknown Source)
              at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:76)
              at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:599)
              at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:452)
              at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              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.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor10.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:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
              at $Proxy29.start(Unknown Source)
              at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:365)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
              at sun.reflect.GeneratedMethodAccessor42.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:260)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
              at $Proxy8.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:504)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:218)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:197)
              Caused by: java.lang.NoClassDefFoundError: antlr/ANTLRException
              at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:35)
              at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:72)
              at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54)
              at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
              at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:363)
              at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:327)
              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:414)
              at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:575)
              at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245)
              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108)
              at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:260)
              ... 80 more

              • 4. Re: entity manager not working on RC4
                knifegun Newbie

                Anybody resolve this issue?

                • 5. Re: entity manager not working on RC4
                  Quande Ren Newbie

                  My problem has been solved. the real problem is the multiple fields primary key. see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76717 for more info.

                  • 6. Re: entity manager not working on RC4
                    Pieter-Jan Malfait Newbie

                    maybe the problem could be that no JNDI name is specified in the persistence.xml file, i read on the wiki that this is necessary in RC4.. i also had problems with this couple of days ago