3 Replies Latest reply on Dec 5, 2006 10:46 AM by davidmate

    Hibernate not Working

    ahachmann

      Hello There,
      I am having a slight problem and hope that anyhone has a solution for this.

      As I try to install JBoss-4.0.4 with EJB 3.0 RC9 from console for the reason that i have no x-windows I need to patch EJB 3.0 with ant.

      This worked fine on my small debian distri in VM-Ware.

      No i have to install the system un our real server and have the following Problem when Deploying an EJB with Entity Beans alltough I went through the exact same steps. Even the JDK is the same (jdk-1.5.0.8)

      --- MBeans waiting for other MBeans ---
      ObjectName: persistence.units:ear=Syndication.ear,jar=SyndicationEJB.jar,unitName=SyndicationUnit
       State: FAILED
       Reason: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/hibernate/MappingNotFoundException
       I Depend On:
       jboss.jca:service=DataSourceBinding,name=SyndicationMySQL
       Depends On Me:
       jboss.j2ee:ear=Syndication.ear,jar=SyndicationEJB.jar,name=SyndikationHomeImpl,service=EJB3
      
      ObjectName: jboss.j2ee:ear=Syndication.ear,jar=SyndicationEJB.jar,name=SyndikationHomeImpl,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=Syndication.ear,jar=SyndicationEJB.jar,unitName=SyndicationUnit
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: persistence.units:ear=Syndication.ear,jar=SyndicationEJB.jar,unitName=SyndicationUnit
       State: FAILED
       Reason: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/hibernate/MappingNotFoundException
       I Depend On:
       jboss.jca:service=DataSourceBinding,name=SyndicationMySQL
       Depends On Me:
       jboss.j2ee:ear=Syndication.ear,jar=SyndicationEJB.jar,name=SyndikationHomeImpl,service=EJB3
      


      I took a look in the Lib-directories. All Hibenate libs that exist on the one vmware do exist on the server aswell. What am I missing?

      Thanks for any Help,
      Alexander

        • 1. Re: Hibernate not Working
          kolobok

          I have the same.. Did you find a resolution?

          • 2. Re: Hibernate not Working

            Same problem here. I'm using the "all" configuration over jbossas-4.0.4GA, with EJB 3.0 RC9.

            I'd appreciate any help.

            • 3. Re: Hibernate not Working

              Got solution!!!

              The relevant class (org.hibernate.MappingNotFoundException) was added to Hibernate in version 3.2.0.cr3 or 3.2.0.cr4. The version that comes with the EJB3 RC9 is cr4. The version I had in the JBossAS is cr2, which lacked that file.

              The EJB3 ant installer should have copied the new version to the JBossAS, but unfortunately the time stamp of the JBossAS jars was newer than the EJB3, so ant has ignored the copy request.

              My solution was simple - I've used "touch" to update the timestamp of the EJB3 jars, and then they were copied correctly. Another option is to add the attribute overwrite="true" to the copy commands.

              David