3 Replies Latest reply on Apr 29, 2015 9:04 AM by Arnab Ghosh

    Can application using Hibernate version 3.3.2.GA be deployed in Wild fly ?

    Arnab Ghosh Novice

      Hi All,

       

      Is it possible to deploy in application using Hibernate version 3.3.2 with EJB 3.0 in Wild fly 8.2 ? If yes, what should be the process ?

       

      Regards

      Arnab

        • 1. Re: Can application using Hibernate version 3.3.2.GA be deployed in Wild fly ?
          Arnab Ghosh Novice

          As per this: Re: Hibernate 3.3 support I have set the jars as a module like JPA Reference Guide - WildFly 8 - Project Documentation Editor

          Now when I deploy my entity beansi am getting below warnings and error:

           

          WARNINGS:

          23:01:14,434 WARN  [org.jboss.modules] (MSC service thread 1-2) Failed to define class org.jboss.as.jpa.hibernate3.HibernateAnnotationScanner in Module "org.hibernate:3" from local module loader @67117f44 (finder: local module finder @5d3411d (roots: /SDA/apps/wildfly-8.2.0/modules,/SDA/apps/wildfly-8.2.0/modules/system/layers/base)): java.lang.LinkageError: Failed to link org/jboss/as/jpa/hibernate3/HibernateAnnotationScanner (Module "org.hibernate:3" from local module loader @67117f44 (finder: local module finder @5d3411d (roots: /SDA/apps/wildfly-8.2.0/modules,/SDA/apps/wildfly-8.2.0/modules/system/layers/base)))

                  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.as.jpa.hibernate3.HibernatePersistenceProviderAdaptor.addAnnotationScanner(HibernatePersistenceProviderAdaptor.java:66)

                  at org.jboss.as.jpa.hibernate3.HibernatePersistenceProviderAdaptor.addProviderProperties(HibernatePersistenceProviderAdaptor.java:55)

                  at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deployPersistenceUnit(PersistenceUnitServiceHandler.java:340)

                  at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:284)

                  at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleJarDeployment(PersistenceUnitServiceHandler.java:153)

                  at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:128)

                  at org.jboss.as.jpa.processor.PersistenceCompleteInstallProcessor.deploy(PersistenceCompleteInstallProcessor.java:55)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]

                  at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]

          Caused by: java.lang.NoClassDefFoundError: org/hibernate/ejb/packaging/Scanner

                  at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_40]

                  at java.lang.ClassLoader.defineClass(ClassLoader.java:760) [rt.jar:1.8.0_40]

                  at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482) [jboss-modules.jar:1.3.3.Final]

                  ... 21 more

          Caused by: java.lang.ClassNotFoundException: org.hibernate.ejb.packaging.Scanner from [Module "org.hibernate:3" from local module loader @67117f44 (finder: local module finder @5d3411d (roots: /SDA/apps/wildfly-8.2.0/modules,/SDA/apps/wildfly-8.2.0/modules/system/layers/base))]

                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]

                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]

           

           

          EXCEPTIONS:

           

          23:01:15,370 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 57) MSC000001: Failed to start service jboss.persistenceunit."aoma.persistence-wildfly.jar#AOMAPersistence": org.jboss.msc.service.StartException in service jboss.persistenceunit."aoma.persistence-wildfly.jar#AOMAPersistence": org.hibernate.HibernateException: Unable to construct requested dialect [org.hibernate.dialect.PostgreSQLDialect]

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]

                  at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_40]

                  at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]

                  at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]

                  at org.jboss.threads.JBossThread.run(JBossThread.java:122)

          Caused by: org.hibernate.HibernateException: Unable to construct requested dialect [org.hibernate.dialect.PostgreSQLDialect]

                  at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:88)

                  at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:68)

                  at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:213)

                  at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)

                  at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)

                  at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)

                  at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) [hibernate-core.jar:3.3.2.GA_CP03]

                  at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) [hibernate-core.jar:3.3.2.GA_CP03]

                  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852)

                  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845)

                  at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398)

                  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844)

                  at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:152)

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:318) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$1100(PersistenceUnitServiceImpl.java:67) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]

                  ... 8 more

          Caused by: java.lang.ClassCastException: org.hibernate.dialect.PostgreSQLDialect cannot be cast to org.hibernate.dialect.Dialect

                  at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:78)

                  ... 23 more

           

           

          23:01:15,387 INFO  [org.hornetq.core.server] (ServerService Thread Pool -- 56) HQ221007: Server is now live

          23:01:15,388 INFO  [org.hornetq.core.server] (ServerService Thread Pool -- 56) HQ221001: HornetQ Server version 2.4.5.FINAL (Wild Hornet, 124) [b80f6c76-ed07-11e4-b433-99b7475e0b3e]

          23:01:15,397 INFO  [org.hornetq.core.server] (ServerService Thread Pool -- 57) HQ221003: trying to deploy queue jms.queue.DLQ

          2

           

          Any help please

          • 2. Re: Can application using Hibernate version 3.3.2.GA be deployed in Wild fly ?
            Scott Marlow Master

            No, you need at least Hibernate 3.5.x or greater.  Hibernate 3.3.2 does not implement the javax.persistence.spi.PersistenceProvider and other javax.persistence.* interfaces.

            • 3. Re: Can application using Hibernate version 3.3.2.GA be deployed in Wild fly ?
              Arnab Ghosh Novice

              Thanks for your reply. I am trying to update my applications to 3.5.6.final version of hibernate and give it a shot.