5 Replies Latest reply on Sep 19, 2005 11:16 AM by Bill Burke

    Method missing from class in hibernate-annotations.jar

    dornus Novice

      I installed Annotations 3.1beta5 and Hibernate 3.1.beta3

      Now when I try to deploy my ear file I am getting the following exception.

      2005-09-19 09:54:43,318 WARN [org.jboss.system.ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=MyProject.par
      java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getSessionEventListenerConfig()Lorg/hibernate/event/SessionEventListenerConfig;
       at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:111)
       at org.jboss.ejb3.entity.EntityManagerFactoryLoader.loadFactory(EntityManagerFactoryLoader.java:44)
       at org.jboss.ejb3.entity.EntityManagerFactoryLoader.loadFactory(EntityManagerFactoryLoader.java:31)
       at org.jboss.ejb3.Ejb3Module.initializeManagedEntityManagerFactory(Ejb3Module.java:290)
       at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:141)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:233)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:215)
       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.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:950)
      


      When I look in the hibernate-annotations.jar file, I see the AnnotationConfiguration class file.

      As expected, I do not see the method for getSessionEventListenerConfig


        • 1. Re: Method missing from class in hibernate-annotations.jar
          dornus Novice

          Here's more of the log file if you need it.

          2005-09-19 10:06:19,868 INFO [org.hibernate.cfg.Environment] Hibernate 3.1 beta 3
          2005-09-19 10:06:19,888 INFO [org.hibernate.cfg.Environment] loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.max_fetch_depth=1, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=sa, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.url=jdbc:hsqldb:., hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool_size=1}
          2005-09-19 10:06:19,888 INFO [org.hibernate.cfg.Environment] using java.io streams to persist binary types
          2005-09-19 10:06:19,888 INFO [org.hibernate.cfg.Environment] using CGLIB reflection optimizer
          2005-09-19 10:06:19,888 INFO [org.hibernate.cfg.Environment] using JDK 1.4 java.sql.Timestamp handling
          2005-09-19 10:06:20,288 WARN [org.jboss.system.ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=MyProject.par
          java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getSessionEventListenerConfig()Lorg/hibernate/event/SessionEventListenerConfig;
           at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:111)
           at org.jboss.ejb3.entity.EntityManagerFactoryLoader.loadFactory(EntityManagerFactoryLoader.java:44)
           at org.jboss.ejb3.entity.EntityManagerFactoryLoader.loadFactory(EntityManagerFactoryLoader.java:31)
           at org.jboss.ejb3.Ejb3Module.initializeManagedEntityManagerFactory(Ejb3Module.java:290)
           at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:141)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:233)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:215)
           at sun.reflect.GeneratedMethodAccessor4.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:950)
           at $Proxy0.create(Unknown Source)
           at org.jboss.system.ServiceController.create(ServiceController.java:342)
           at org.jboss.system.ServiceController.create(ServiceController.java:281)
           at sun.reflect.GeneratedMethodAccessor6.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 $Proxy10.create(Unknown Source)
           at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:157)
           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.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
           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 $Proxy11.create(Unknown Source)
           at org.jboss.deployment.MainDeployer.create(MainDeployer.java:919)
           at org.jboss.deployment.MainDeployer.create(MainDeployer.java:909)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:773)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
           at sun.reflect.GeneratedMethodAccessor8.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 $Proxy6.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:267)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:217)
           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.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:950)
           at $Proxy0.start(Unknown Source)
           at org.jboss.system.ServiceController.start(ServiceController.java:436)
           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.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:273)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:973)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:721)
           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:434)
           at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
           at org.jboss.Main.boot(Main.java:195)
           at org.jboss.Main$1.run(Main.java:463)
           at java.lang.Thread.run(Thread.java:595)
          

          
          --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
          ObjectName: jboss.j2ee:service=EJB3,name=ejb3.UserTestBean
           State: FAILED
           Reason: javax.naming.NameNotFoundException: managedEntityFactory.MyProjectPar
          not bound
          
          ObjectName: jboss.j2ee:service=EJB3,module=MyProject.par
           State: FAILED
           Reason: java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration
          .getSessionEventListenerConfig()Lorg/hibernate/event/SessionEventListenerConfig;
          


          • 2. Re: Method missing from class in hibernate-annotations.jar
            dornus Novice

            Ok, I think that problem disappeared when I downloaded the entitymanager3.1beta3

            Now a new problem has arised:

            2005-09-19 10:18:20,120 WARN [org.jboss.system.ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=MyProject.par
            java.lang.NoClassDefFoundError: org/hibernate/ejb/xml/PersistenceXmlLoader
            


            When I look in the jar file, the class is there, but the package is incorrect. The package it is in is now:
            org/hibernate/ejb/packaging





            • 3. Re: Method missing from class in hibernate-annotations.jar
              Bill Burke Master

              I'm releasing JBoss EJB 3.0 RC2 today. This looks like a version conflict.

              You can go to www.sf.net/projects/jboss to download the latest EJB3. it is already up.

              • 4. Re: Method missing from class in hibernate-annotations.jar
                dornus Novice

                 

                "bill.burke@jboss.com" wrote:
                I'm releasing JBoss EJB 3.0 RC2 today. This looks like a version conflict.

                You can go to www.sf.net/projects/jboss to download the latest EJB3. it is already up.


                Does that version use 3.1beta5 annotations? I need to use the feature where a primary key can be made up of multiple foreign keys.