4 Replies Latest reply on Sep 2, 2014 1:49 PM by sdyarnell

    Adding Module to Jboss

    sdyarnell

      I am trying to get hibernate 4.3.5 to work in JBoss 7.1.3.Final. I was trying to do it a different way initially, by integrating it into the JBoss completely by replacing 4.1.6, but then I had this thought occur to me: org.hibernate.custom module.

       

      What I am trying to do right now is declare the following in my persistence.xml:

       

      <property name="jboss.as.jpa.adapterModule" value="org.hibernate.custom" />

      <property name="jboss.as.jpa.providerModule" value="org.hibernate.custom" />

       

      and place everything required for 4.3.5 in that module folder. I think I have it setup correctly, but it is claiming the following error:

       

      2014-08-27 12:36:09,242 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11) MSC00001: Failed to start service jboss.deployment.subunit."server-app.ear"."com.server.license.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."server-app.ear"."com.server.license.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "com.server.license.jar" of deployment "server-app.ear"

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]

        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011445: Failed to get adapter for persistence provider 'org.hibernate.ejb.HibernatePersistence'

        at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.getPersistenceProviderAdaptor(PersistenceUnitDeploymentProcessor.java:482)

        at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:279)

        at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:260)

        at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:147)

        at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:122)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]

        ... 5 more

       

      The class org.hibernate.ejb.HibernatePersistence is of course a part of the entity manager module of hibernate, and it is in the jar in the org.hibernate.custom module directory. What am I missing here?

        • 1. Re: Adding Module to Jboss
          wdfink

          What you try to achieve? Replace the Hibernate version for the JBoss?

          Might be difficult, I would use a newer version, i.e. WildFly then

          • 2. Re: Adding Module to Jboss
            sdyarnell

            Using JBoss 8 for this release is not an option unfortunately.

             

            Is this module idea no good? If not, I can describe the work I have put in previously and maybe we can see how far away I was there.

             

            Is this org.hibernate.custom idea no good?

             

            EDIT: and yes, I am trying to use the newer hibernate version 4.3.5 with Jboss 7.1.3.

            • 3. Re: Adding Module to Jboss
              sdyarnell

              BUMP.

               

              Wolf-Dieter, is this module idea plausible?

              • 4. Re: Adding Module to Jboss
                sdyarnell

                I believe I have seen around the interwebs that 4.3.5 should use this provider: org.hibernate.jpa.HibernatePersistenceProvider

                 

                Still got the same message:

                 

                2014-08-29 09:33:16,679 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-9) MSC00001: Failed to start service jboss.deployment.subunit."server-app.ear"."com.server.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."server-app.ear"."com.server.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "com...server.license.jar" of deployment "-server-app.ear"

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]

                  at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]

                Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011445: Failed to get adapter for persistence provider 'org.hibernate.jpa.HibernatePersistenceProvider'

                  at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.getPersistenceProviderAdaptor(PersistenceUnitDeploymentProcessor.java:482)

                  at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:279)

                  at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:260)

                  at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:147)

                  at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:122)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]

                  ... 5 more