4 Replies Latest reply on Nov 10, 2004 5:15 AM by priyajith

    My JBoss 3.2.5 to JBoss 4.0.0 migration troubles with Hibern

    minmay

      Hello,

      I simply want to port my web application from JBoss 3.2.5 to
      JBoss 4.0.0 with a minimal of changes.

      My web application uses JBoss 3.2.5 with
      Hibernate version 2.1.6 with no problems.
      I don't use any Hibernate integration. I simply
      place my hibernate.cfg.xml file and my mappings
      in my WEB-INF/classes directory and it works fine.

      Why doesn't this work in JBoss 4.0.0? Now I am getting
      class not found errors? I realize that JBoss 4.0.0 ships
      with Hibernate, which version does it ship with?

      Furthermore, what steps must I take to use Hibernate with
      JBoss 4.0.0 the hibernate configurations files placed in
      WEB-INF/classes directory?

      Thank you.

        • 1. Re: My JBoss 3.2.5 to JBoss 4.0.0 migration troubles with Hi
          minmay

          I want to note that I did properly change all the other
          xml configuration files to JBoss 4.0.0, such as the jboss-app
          and jboss-web xml files.

          • 2. Re: My JBoss 3.2.5 to JBoss 4.0.0 migration troubles with Hi
            minmay

            I get the following debug output in my logs:

            2004-11-04 10:00:58,258 INFO [net.sf.hibernate.cfg.Environment] Hibernate 2.1.5
            2004-11-04 10:00:58,268 INFO [net.sf.hibernate.cfg.Environment] hibernate.properties not found
            2004-11-04 10:00:58,278 INFO [net.sf.hibernate.cfg.Environment] using CGLIB reflection optimizer
            2004-11-04 10:00:58,288 INFO [net.sf.hibernate.cfg.Configuration] configuring from resource: /hibernate.cfg.xml
            2004-11-04 10:00:58,288 INFO [net.sf.hibernate.cfg.Configuration] Configuration resource: /hibernate.cfg.xml
            2004-11-04 10:00:58,308 WARN [net.sf.hibernate.cfg.Configuration] /hibernate.cfg.xml not found


            Seems as though the JBoss 4.0.0 integration no longer searches the WEB-INF/classes directory for configuration informatin. How can I make it look there though? It worked fine before.

            • 3. Re: My JBoss 3.2.5 to JBoss 4.0.0 migration troubles with Hi
              minmay

              Hello people,

              I am still stuck on this issue, and would appreciate help.
              I don't even see much help on how to use the JBoss 4.0.0 Hibernate integration.

              Thank you.

              • 4. Re: My JBoss 3.2.5 to JBoss 4.0.0 migration troubles with Hi
                priyajith

                Hi,
                I faced a similar problem while migrating to JBoss 4.0.0 from JBoss 3.2.5. Since Jboss 4.0.0 has got inbuild support for hibernate, it has a hibernate2.jar file in the %JBOSS_HOME%\server\default\lib directory. my application's lib directory also had that hibernate2.jar file. so what i did was, i removed the hibernate2.jar from \server\default\lib directory and it worked. Hopes this help you.