Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Support for Hibernate 4.x

    Hello,

    currently I evaluating the smartgwt enterprise edition 3.1d (nigthly) and need to use hibernate 4. Now I get the following Exception:

    Code:
    java.lang.NoClassDefFoundError: org/hibernate/impl/SessionFactoryImpl
    	at com.isomorphic.hibernate.HibernateDataSource.getHibernateDialectAsSmartClientDbType(HibernateDataSource.java:5139)
    	at com.isomorphic.hibernate.HibernateDataSource.parseAdvancedCriteria(HibernateDataSource.java:2021)
    	at com.isomorphic.hibernate.HibernateDataSource.parseAdvancedCriteria(HibernateDataSource.java:1927)
    	at com.isomorphic.hibernate.HibernateDataSource.createQuery(HibernateDataSource.java:1474)
    	at com.isomorphic.hibernate.HibernateDataSource.processRequest(HibernateDataSource.java:1083)
    	at com.isomorphic.hibernate.HibernateDataSource.executeFetch(HibernateDataSource.java:716)
    	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1356)
    	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:726)
    	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
    	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2000)
    	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:216)
    	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:173)
    	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:138)
    	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:74)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    Is there any plan to support Hibernate 4?

    #2
    Hibernate made non-backwards compatible changes in 4.0, but we have already worked around this if you get the latest 3.1d nightly.

    Comment


      #3
      I still get the exceptions with the latest nighly build (3.1d/EnterpriseEval/2012-09-20)

      Code:
      java.lang.NoClassDefFoundError: org/hibernate/impl/SessionFactoryImpl
      	at com.isomorphic.hibernate.HibernateDataSource.getHibernateDialectAsSmartClientDbType(HibernateDataSource.java:5141)
      	at com.isomorphic.hibernate.HibernateDataSource.parseAdvancedCriteria(HibernateDataSource.java:2023)
      	at com.isomorphic.hibernate.HibernateDataSource.parseAdvancedCriteria(HibernateDataSource.java:1929)
      	at com.isomorphic.hibernate.HibernateDataSource.createQuery(HibernateDataSource.java:1474)
      	at com.isomorphic.hibernate.HibernateDataSource.processRequest(HibernateDataSource.java:1083)
      	at com.isomorphic.hibernate.HibernateDataSource.executeFetch(HibernateDataSource.java:716)
      	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1356)
      	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:726)
      	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
      	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
      	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2000)
      	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:216)
      	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:173)
      	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:138)
      	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:74)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      Caused by: java.lang.ClassNotFoundException: org.hibernate.impl.SessionFactoryImpl
      	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
      	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
      	... 46 more

      Comment


        #4
        Hi,

        Looks like you are missing Hibernate jars in your class path.

        Alius

        Comment


          #5
          In Hibernate 4 the SessionFactoryImpl is moved to the package
          Code:
          org.hibernate.internal
          see also: http://docs.jboss.org/hibernate/orm/...ctoryImpl.html

          Comment


            #6
            btw:

            I use the following maven dependencies, which work fine without smartgwt server:
            Code:
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-core</artifactId>
                        <version>4.1.7.Final</version>
                    </dependency>
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-entitymanager</artifactId>
                        <version>4.1.7.Final</version>
                    </dependency>
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-validator</artifactId>
                        <version>4.3.0.Final</version>
                    </dependency>
                        <dependency>
                            <groupId>org.hibernate.javax.persistence</groupId>
                            <artifactId>hibernate-jpa-2.0-api</artifactId>
                            <version>1.0.1.Final</version>
                        </dependency>

            Comment


              #7
              Hi,

              Thanks for spotting this. I've removed dependency on SessionFactoryImpl and committed changes. You can test it with next nightly build.

              Regards,
              Alius

              Comment

              Working...
              X