5 Replies Latest reply on Jul 1, 2010 2:55 AM by Syed Mahdi

    Hibernate core

    Adrien Ruffie Newbie

      Hello,

       

      I have deployed my webapp on JBoss 5.1 AS but two hibernate-core jars are loaded:

       

      One located at: jboss-5.1.0.GA/common/lib/hibernate-core.jar

       

      And the second at:

       

      jboss-5.1.0.GA/server/default/deploy/dragon-ui-1.1-SNAPSHOT/WEB-INF/lib/hibernate-core-3.5.1-Final.jar

      I need to use the second hibernate-core-3.5.1-Final.jar inevitably for my application.

      I have a jboss-classloading.xml in my application with the following content:

      <?xml version="1.0" encoding="UTF-8"?>
      <classloading xmlns="urn:jboss:classloading:1.0" name="petals-master-ui.war"
          domain="petals-master-ui" export-all="NON_EMPTY"
          import-all="true">
      </classloading>


      But that do nothing ... I don't understand why I can exclude the loading jar located
      jboss-5.1.0.GA/common/lib/hibernate-core.jar

      I think my error:

      java.lang.NoSuchMethodError: org.hibernate.engine.ActionQueue.registerProcess(Lorg/hibernate/action/BeforeTransactionCompletionProcess;)V

       

       

      I linked to this issue because the method isn't located into hibernate-core.jar but in hibernate-core-3.5.1-Final.jar but

      the method is called from the hibernate-core.jar ...

       

      Is someone can help me ?

       

      Thank, Adrien

        • 1. Re: Hibernate core
          Syed Mahdi Apprentice

          I have exactly the same issue.

           

          it keeps on using the one in commons/lib folder. while my app has is supposed to work with hibernate 3.5.3.  I had heard that when there is a lib placed in the web-inf/lib folder it is given preference over the ones in the commons/lib folder.

           

          I deleted the four hibernate jars in the commons/lib folder and added my hibernate jar there and it started working. but this is a workaround not a solution. If jboss is configured to use the hibernate 3.3 then it will give errors probably.

           

          there should be a way, that the application uses the jar in web-inf/lib folder. please do post if you have the solution for this.

           

          Thanks

          Syed

          • 2. Re: Hibernate core
            Adrien Ruffie Newbie

            I think remove hibernate jars from commons/lib isn't a good solution,

             

            but any one have a solution ? because it's a very blocking problem ...

            • 3. Re: Hibernate core
              Syed Mahdi Apprentice

              exactly!! It should have a solution.. I heard u can actually tell jboss to look in the web-inf/lib folder for a certain jar take that only in such a case.

               

              there should be more than just two ppl who came across this issue. isnt no one using new hibernate with new jboss vers.

              • 4. Re: Hibernate core
                jaikiran pai Master

                See if this helps. It was written for AS-4.2.x but should apply for AS-5 too.

                 

                P.S: I thought of pointing you to some forum posts, but some of them discuss  various different issues, so might be confusing.

                • 5. Re: Hibernate core
                  Syed Mahdi Apprentice

                  Ok this is what I was looking for.

                   

                  Thanks.