6 Replies Latest reply on Sep 30, 2011 5:29 AM by vi .

    ejb  failing to load  in Jboss as7

    vi . Newbie

      I'm created a small project with jpa,hibernate connecting to mysql,I'm unable to get it this  to load/deploy , thorws .DeploymentUnitProcessingException: persistence provider module load error application (class org.hibernate.ejb.HibernatePersistence)

       

      I've attached my sample maven project, any help would be great on this.

       

       

       

      16:11:02,183 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "core-erm-1.0-SNAPSHOT.jar"

      16:11:02,285 INFO  [org.jboss.jpa] (MSC service thread 1-1) read persistence.xml for greeting-pu

      16:11:02,302 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to core-erm-1.0-SNAPSHOT.jar

      16:11:02,311 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) greeting-pu is configured to use application supplied persistence provider

      16:11:02,335 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named GreetingBean in deployment unit deployment "core-erm-1.0-SNAPSHOT.jar" are as follows:

       

          java:global/core-erm-1.0-SNAPSHOT/GreetingBean!com.greeting.core.GreetingBean

          java:app/core-erm-1.0-SNAPSHOT/GreetingBean!com.greeting.core.GreetingBean

          java:module/GreetingBean!com.greeting.core.GreetingBean

          java:global/core-erm-1.0-SNAPSHOT/GreetingBean

          java:app/core-erm-1.0-SNAPSHOT/GreetingBean

          java:module/GreetingBean

       

      16:11:02,434 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."core-erm-1.0-SNAPSHOT.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."core-erm-1.0-SNAPSHOT.jar".INSTALL: Failed to process phase INSTALL of deployment "core-erm-1.0-SNAPSHOT.jar"

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

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

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

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

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

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: persistence provider module load error application (class org.hibernate.ejb.HibernatePersistence)

          at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.lookupProvider(PersistenceUnitDeploymentProcessor.java:457)

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

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

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

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

          ... 5 more

      Caused by: org.jboss.modules.ModuleNotFoundException: Module application:main is not found

          at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:121)

          at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:245)

          at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:194)

          at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:97)

          at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:176)

          at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:172)

          at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.lookupProvider(PersistenceUnitDeploymentProcessor.java:455)

          ... 9 more

       

      16:11:02,649 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "core-erm-1.0-SNAPSHOT.jar" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"core-erm-1.0-SNAPSHOT.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"core-erm-1.0-SNAPSHOT.jar\".INSTALL: Failed to process phase INSTALL of deployment \"core-erm-1.0-SNAPSHOT.jar\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.\"core-erm-1.0-SNAPSHOT\".\"core-erm-1.0-SNAPSHOT\".GreetingBean.Validator missing [ jboss.naming.context.java.comp.\"core-erm-1.0-SNAPSHOT\".\"core-erm-1.0-SNAPSHOT\".GreetingBean ]","jboss.naming.context.java.comp.\"core-erm-1.0-SNAPSHOT\".\"core-erm-1.0-SNAPSHOT\".GreetingBean.ValidatorFactory missing [ jboss.naming.context.java.comp.\"core-erm-1.0-SNAPSHOT\".\"core-erm-1.0-SNAPSHOT\".GreetingBean ]"]}

      16:11:02,688 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment core-erm-1.0-SNAPSHOT.jar in 40ms

      16:11:02,692 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"core-erm-1.0-SNAPSHOT.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"core-erm-1.0-SNAPSHOT.jar\".INSTALL: Failed to process phase INSTALL of deployment \"core-erm-1.0-SNAPSHOT.jar\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.\"core-erm-1.0-SNAPSHOT\".\"core-erm-1.0-SNAPSHOT\".GreetingBean.Validator missing [ jboss.naming.context.java.comp.\"core-erm-1.0-SNAPSHOT\".\"core-erm-1.0-SNAPSHOT\".GreetingBean ]","jboss.naming.context.java.comp.\"core-erm-1.0-SNAPSHOT\".\"core-erm-1.0-SNAPSHOT\".GreetingBean.ValidatorFactory missing [ jboss.naming.context.java.comp.\"core-erm-1.0-SNAPSHOT\".\"core-erm-1.0-SNAPSHOT\".GreetingBean ]"]}}}

        • 1. Re: ejb jar(JPA+Hibernate) failing to load  in Jboss as7
          jaikiran pai Master

          Caused by: org.jboss.modules.ModuleNotFoundException: Module application:main is not found

              at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:121)

              at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:245)

              at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:194)

              at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:97)

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:176)

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:172)

              at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.lookupProvider(PersistenceUnitDeploymentProcessor.java:455)

              ... 9 more

          Your persistence.xml has this:

           

          <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled"/>

           

          But the error log shows that it's trying to load a module named "application". Are you sure you post the correct log/files?

          • 2. Re: ejb jar(JPA+Hibernate) failing to load  in Jboss as7
            vi . Newbie

            HI Jaikiran,

             

            I'm using jboss 7.0.2  and it's fresh except that i've added the mysql connector inside modules.

             

            yes I'm sure. I don't have module called application inside ,(I've attached the project(maven) ) if i remove

            <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled"/> 

             

            I'm getting this below error.

            16:43:15,792 INFO  [org.jboss.jpa] (MSC service thread 1-4) read persistence.xml for greeting-pu

            16:43:15,803 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to core-erm-1.0-SNAPSHOT.jar

            16:43:15,805 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added (default provider) org.hibernate dependency to application deployment (since 1 PU(s) didn't specify jboss.as.jpa.providerModule)

            16:43:15,806 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added org.hibernate dependency to application deployment

            16:43:15,834 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named GreetingBean in deployment unit deployment "core-erm-1.0-SNAPSHOT.jar" are as follows:

             

                java:global/core-erm-1.0-SNAPSHOT/GreetingBean!com.greeting.core.GreetingBean

                java:app/core-erm-1.0-SNAPSHOT/GreetingBean!com.greeting.core.GreetingBean

                java:module/GreetingBean!com.greeting.core.GreetingBean

                java:global/core-erm-1.0-SNAPSHOT/GreetingBean

                java:app/core-erm-1.0-SNAPSHOT/GreetingBean

                java:module/GreetingBean

             

            16:43:15,954 ERROR [org.jboss.as] (MSC service thread 1-8) JBoss AS 7.0.2.Final "Arc" started (with errors) in 2875ms - Started 127 of 188 services (4 services failed or missing dependencies, 57 services are passive or on-demand)

            16:43:16,156 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "core-erm-1.0-SNAPSHOT.jar" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"core-erm-1.0-SNAPSHOT.jar#greeting-pu\" missing [ jboss.naming.context.java.testCoreDS ]"]}

            16:43:16,202 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment core-erm-1.0-SNAPSHOT.jar in 47ms

            1

            • 3. Re: ejb jar(JPA+Hibernate) failing to load  in Jboss as7
              jaikiran pai Master

              How have you configured your datasource?

              • 4. Re: ejb jar(JPA+Hibernate) failing to load  in Jboss as7
                vi . Newbie

                yes  it's like this  attached file (only shown the data sources portion)

                 

                Message was edited by: vi .

                • 5. Re: ejb jar(JPA+Hibernate) failing to load  in Jboss as7
                  jaikiran pai Master

                  So change your persistence.xml to refer to java:jboss/datasources/testCoreDS JNDI name instead of the current java:/testCoreDS

                   

                  P.S: It's better to post the relevant (not too huge) log/code/xml instead of attaching files - saves some time for people trying to help.

                  • 6. Re: ejb jar(JPA+Hibernate) failing to load  in Jboss as7
                    vi . Newbie

                    Thanks Jaikiran, it works and i will follow ur advise on the sharing files.