0 Replies Latest reply on Dec 18, 2015 10:21 AM by umesh patil

    Failed to define class org.jboss.as.jpa.hibernate3.HibernateAnnotationScanner

    umesh patil Newbie

      Hi Guys,

       

      I am building a project on JBoss EAP 6.2, but I am unable to build it. I see below error in my server.log

       

      **************************************************************ERROR LOG******************

      20:46:00,693 WARN  [org.jboss.modules] (MSC service thread 1-1) Failed to define class org.jboss.as.jpa.hibernate3.HibernateAnnotationScanner in Module "deployment.portal-18-beercore.ear:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/jboss/as/jpa/hibernate3/HibernateAnnotationScanner (Module "deployment.portal-18-beercore.ear:main" from Service Module Loader)

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

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

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

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

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

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

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

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

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

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

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

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]

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

        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_03]

        at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_03]

        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]

        ... 21 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.ejb.packaging.Scanner from [Module "deployment.portal-18-beercore.ear:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

        ... 25 more

       

       

      20:46:01,227 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "portal-19-beer.ear" (runtime-name : "portal-19-beer.ear")

      20:46:01,227 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "portal-18-beercore.ear" (runtime-name : "portal-18-beercore.ear")

      20:46:01,227 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "portal-00.ear" (runtime-name : "portal-00.ear")

      20:46:01,227 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "jminix-console.war" (runtime-name : "jminix-console.war")

      20:46:01,227 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "BPP_S.war" (runtime-name : "BPP_S.war")

      20:46:01,227 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 30) JBAS018559: Deployed "barclays_jboss_root_eap6.war" (runtime-name : "barclays_jboss_root_eap6.war")

      20:46:01,242 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.naming.context.java.beercoreDataSourceXA (missing) dependents: [service jboss.persistenceunit."portal-18-beercore.ear/beercore.jar#CoreBEER"]

       

       

      20:46:01,258 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015962: Http management interface listening on https://127.0.0.1:8041/management

      20:46:01,258 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015952: Admin console listening on https://127.0.0.1:8041

      20:46:01,258 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) started (with errors) in 20111ms - Started 832 of 978 services (12 services failed or missing dependencies, 79 services are passive or on-demand)

      **************************************************************ERROR LOG******************

       

      Hibernate Jars that Library that I have placed are as per below module.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- Represents the Hibernate 3 module-->

      <module xmlns="urn:jboss:module:1.1" name="org.hibernate" slot="3.3">

          <resources>

              <resource-root path="hibernate-core-3.3.2.GA.jar"/>

        <resource-root path="hibernate-annotations-3.4.0.GA.jar"/>

        <resource-root path="hibernate-commons-annotations-3.1.0.GA.jar"/>

        <resource-root path="ejb3-persistence-1.0.2.GA.jar"/>

        <resource-root path="antlr-2.7.6.jar"/>

        <resource-root path="javassist-3.9.0.GA.jar"/>

        <!-- <resource-root path="jboss-as-jpa-hibernate3-7.1.2.Final.jar"/>  -->

          </resources>

       

       

          <dependencies>

              <module name="asm.asm"/>

              <module name="javax.api"/>

              <module name="javax.transaction.api"/>

              <module name="javax.validation.api"/>

              <module name="org.apache.commons.collections"/>

              <module name="org.infinispan" optional="true"/>

              <module name="org.dom4j"/>

              <module name="org.jboss.as.jpa.hibernate" slot="3" optional="true"/>

              <module name="org.slf4j"/>

      <!-- <module name="org.jboss.as.jboss-as-jpa-hibernate3"/> -->

          </dependencies>

      </module>

       

      Could anyone advise, what could be an error?