0 Replies Latest reply on Aug 7, 2014 7:13 AM by suman sadhukhan

    org.hibernate.ejb.packaging.Scanner  ClassNotFoundException once deplying hibernate3.3.2.GA application in JBOSS EAP 6.2 server

    suman sadhukhan Newbie


      Hi,

      I am getting org.hibernate.ejb.packaging.Scanner ClassNotFoundException once deploying hibernate3.3.2.GA application in JBOSS EAP 6.2 server. same war file is successfully deployed in Tomcat 7 server.

      Persistence.xml file

       

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

      persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

      <persistence-unit name="AmexPU" transaction-type="RESOURCE_LOCAL">

      <provider>org.hibernate.ejb.HibernatePersistence</provider>      

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

      <property name="hibernate.archive.autodetection" value="class, hbm"/>

      <property name="hibernate.format_sql" value="true"/>   

      <property name="hibernate.hbm2ddl.auto" value="verify"/>

      <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy"/>

      <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>                       

      </properties>               

      </persistence-unit>

      persistence>

       

       

      Please find error below.

      16:23:02,767 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final-redhat-2

      16:23:06,778 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA-redhat-1

      16:23:07,637 INFO  [org.jboss.as] (MSC service thread 1-8) JBAS015899: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) starting

      16:23:21,180 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)

      16:23:21,243 INFO  [org.xnio] (MSC service thread 1-3) XNIO Version 3.0.7.GA-redhat-1

      16:23:21,477 INFO  [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.0.7.GA-redhat-1

      16:23:22,273 INFO  [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.2.18.GA-redhat-1

      16:23:22,649 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 42) JBAS013171: Activating Security Subsystem

      16:23:22,695 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 37) JBAS011800: Activating Naming Subsystem

      16:23:22,867 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activating WebServices Extension

      16:23:23,117 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) JBAS010280: Activating Infinispan subsystem.

      16:23:23,148 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 35) JBAS012605: Activated the following JSF Implementations: [main, 1.2]

      16:23:23,288 INFO  [org.jboss.as.security] (MSC service thread 1-4) JBAS013170: Current PicketBox version=4.0.19.SP2-redhat-1

      16:23:24,335 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-5) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.23.Final-redhat-1)

      16:23:28,112 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      16:23:28,768 INFO  [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service

      16:23:28,783 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default]

      16:23:35,711 INFO  [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/0.0.0.0:8080

      16:23:35,993 INFO  [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003000: Coyote HTTP/1.1 starting on: http-/0.0.0.0:8080

      16:23:38,848 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      16:23:40,519 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) JBAS015012: Started FileSystemDeploymentService for directory C:\Users\SS33075\Env\jboss-eap-6.2\standalone\deployments

      16:23:40,551 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on 127.0.0.1:9999

      16:23:40,551 INFO  [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on 0.0.0.0:4447

      16:23:40,691 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "macro5-default.war" (runtime-name: "macro5-default.war")

      16:23:43,749 INFO  [org.jboss.ws.common.management] (MSC service thread 1-4) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.3.Final-redhat-1

      16:25:15,276 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_cs.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_de_DE.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_es.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_fr.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_hu.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_it.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_ja_JP.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_ko_KR.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_pl.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_pt_BR.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_ru.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_zh_CN.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry derbyLocale_zh_TW.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/derbyclient.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,025 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry activation.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/mail-1.4.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,197 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry xercesImpl.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/xalan-2.7.0.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,197 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry xml-apis.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/xalan-2.7.0.jar  does not point to a valid jar for a Class-Path reference.

      16:25:16,197 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry serializer.jar in /C:/Users/SS33075/Env/jboss-eap-6.2/bin/content/macro5-default.war/WEB-INF/lib/xalan-2.7.0.jar  does not point to a valid jar for a Class-Path reference.

      16:25:23,860 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'

      16:25:25,482 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for AmexPU

      16:25:43,813 WARN  [org.jboss.as.logging] (MSC service thread 1-6) JBAS011510: The configuration file in 'logging.properties' appears to be a J.U.L. configuration file. The log manager does not allow this type of configuration file.

      16:25:45,154 WARN  [org.jboss.modules] (MSC service thread 1-6) Failed to define class org.jboss.as.jpa.hibernate3.HibernateAnnotationScanner in Module "deployment.macro5-default.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/jboss/as/jpa/hibernate3/HibernateAnnotationScanner (Module "deployment.macro5-default.war: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.handleWarDeployment(PersistenceUnitServiceHandler.java:190)

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

      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_07]

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

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

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

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

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

      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.macro5-default.war: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