4 Replies Latest reply on Dec 7, 2012 7:14 AM by johnibosco

    EAR deployment in Jboss 7.1.1 with Hibernate 4 and JPA2 Errored!

    Newbie

      Hi Every one,

       

       

      I am trying to deploy and J2EE application in jboss 7.1.1 with hibernate 4 and jpa2 dependencies but it is not deployed but throws error saying

      javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'org.apache.openjpa.persistence.PersistenceProviderImpl' not found.

       

      I am not at all using openJPA in my project,why my jboss 7.1.1 is trying to trying look for the OpenJPA provider.??

       

      This application runs perfectly in jboss 5.0.1 but not in 7.1.1.

       

      My persistence.xml:

      ==============

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

      <persistence 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_2_0.xsd"

          version="2.0">

          <persistence-unit name="databasename"  >

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

              <class>com.event.domain.EntityVO</class>

             

              <properties>

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

                 

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

                  <property name="hibernate.jdbc.batch_size" value="100" />

                  <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />

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

              </properties>

          </persistence-unit>

      </persistence>

       

      Jboss error log:

      ===========

       

       

      17:32:26,921 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "myapp.war"

      17:32:31,468 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jaxb-api.jar in "/D:/Tools/jboss-as-7.1.1.Final/bin/content/myappear.ear/myapp.war/WEB-INF/lib/jaxb-impl-2.1.jar"  does not point to a valid jar for a Class-Path reference.

      17:32:31,484 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry activation.jar in "/D:/Tools/jboss-as-7.1.1.Final/bin/content/myappear.ear/myapp.war/WEB-INF/lib/jaxb-impl-2.1.jar"  does not point to a valid jar for a Class-Path reference.

      17:32:31,484 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jsr173_1.0_api.jar in "/D:/Tools/jboss-as-7.1.1.Final/bin/content/myappear.ear/myapp.war/WEB-INF/lib/jaxb-impl-2.1.jar"  does not point to a valid jar for a Class-Path reference.

      17:32:31,484 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jaxb1-impl.jar in "/D:/Tools/jboss-as-7.1.1.Final/bin/content/myappear.ear/myapp.war/WEB-INF/lib/jaxb-impl-2.1.jar"  does not point to a valid jar for a Class-Path reference.

      17:32:31,500 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry xml-apis.jar in "/D:/Tools/jboss-as-7.1.1.Final/bin/content/myappear.ear/myapp.war/WEB-INF/lib/serializer-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.

      17:32:31,500 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry xercesImpl.jar in "/D:/Tools/jboss-as-7.1.1.Final/bin/content/myappear.ear/myapp.war/WEB-INF/lib/xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.

      17:32:31,515 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry xml-apis.jar in "/D:/Tools/jboss-as-7.1.1.Final/bin/content/myappear.ear/myapp.war/WEB-INF/lib/xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.

      17:32:31,515 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry serializer.jar in "/D:/Tools/jboss-as-7.1.1.Final/bin/content/myappear.ear/myapp.war/WEB-INF/lib/xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.

      17:32:31,546 TRACE [org.jboss.as.jpa] (MSC service thread 1-4) parsed persistence unit definitions for ear myappear.ear

      17:32:31,546 TRACE [org.jboss.as.jpa] (MSC service thread 1-4) incrementing PU count for myappear.ear by 0

      17:32:31,656 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) parse persistence.xml: attribute value(0) = activemq

      17:32:31,656 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) parse persistence.xml: attribute value(1) = RESOURCE_LOCAL

      17:32:31,656 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) parse persistence.xml: element=provider

      17:32:31,671 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) parse persistence.xml: element=class

      17:32:31,671 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) parse persistence.xml: element=class

      17:32:31,671 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) parse persistence.xml: element=class

      17:32:31,671 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) parse persistence.xml: reached ending persistence-unit tag

      17:32:31,671 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for activemq

      17:32:31,671 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) PersistenceUnitMetadataImpl(version=1.0) [

          name: activemq

          jtaDataSource: null

          nonJtaDataSource: null

          transactionType: RESOURCE_LOCAL

          provider: org.apache.openjpa.persistence.PersistenceProviderImpl

          classes[

              org.apache.activemq.store.jpa.model.StoredMessage        org.apache.activemq.store.jpa.model.StoredSubscription        org.apache.activemq.store.jpa.model.StoredMessageReference    ]

          packages[

          ]

          mappingFiles[

          ]

          jarFiles[

          ]

          validation-mode: AUTO

          shared-cache-mode: UNSPECIFIED

          properties[

          ]]

      17:32:31,687 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) parsed persistence unit definitions for war myapp.war

      17:32:31,687 TRACE [org.jboss.as.jpa] (MSC service thread 1-3) incrementing PU count for myappear.ear by 1

      17:32:31,703 DEBUG [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api:main dependency to myappear.ear

      17:32:31,703 DEBUG [org.jboss.as.jpa] (MSC service thread 1-3) added javaee.api:main dependency to myappear.ear

      17:32:31,703 DEBUG [org.jboss.as.jpa] (MSC service thread 1-3) added org.jboss.as.jpa:main dependency to myappear.ear

      17:32:31,703 DEBUG [org.jboss.as.jpa] (MSC service thread 1-3) added org.jboss.as.jpa.spi:main dependency to myappear.ear

      17:32:31,718 DEBUG [org.jboss.as.jpa] (MSC service thread 1-3) added org.javassist:main dependency to myappear.ear

      17:32:31,718 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,718 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,718 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,718 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,734 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,734 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,734 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,734 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,750 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,750 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,750 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,750 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,750 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,750 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,750 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,765 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,765 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,765 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,765 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,765 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,765 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,765 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,781 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,781 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,781 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,781 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,781 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,781 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,796 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,796 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,796 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,796 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,796 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,796 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,796 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,812 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,812 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,812 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,812 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,812 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,812 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,812 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,828 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,828 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,828 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,828 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,828 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,828 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,843 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,843 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,843 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,843 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,843 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,843 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,843 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,859 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,859 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,859 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,859 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,859 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,859 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,859 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,875 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,875 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,875 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,875 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,875 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,875 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,890 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,890 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,890 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search for name 'null' inside of myapp.war

      17:32:31,890 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu searching with empty unit name, application myappear.ear has 1 persistence unit definitions

      17:32:31,890 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment check 'null' against pu 'activemq'

      17:32:31,890 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) findWithinDeployment matched 'null' against pu 'activemq'

      17:32:31,890 TRACE [org.jboss.as.jpa] (MSC service thread 1-2) pu search found myappear.ear/myapp.war#activemq

      17:32:31,906 DEBUG [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api:main dependency to myapp.war

      17:32:31,906 DEBUG [org.jboss.as.jpa] (MSC service thread 1-2) added javaee.api:main dependency to myapp.war

      17:32:31,906 DEBUG [org.jboss.as.jpa] (MSC service thread 1-2) added org.jboss.as.jpa:main dependency to myapp.war

      17:32:31,906 DEBUG [org.jboss.as.jpa] (MSC service thread 1-2) added org.jboss.as.jpa.spi:main dependency to myapp.war

      17:32:31,906 DEBUG [org.jboss.as.jpa] (MSC service thread 1-2) added org.javassist:main dependency to myapp.war

      17:32:31,921 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-1) JBAS018567: Deployment "deployment.javassist.proxy" is using a private module ("org.javassist:main") which may be changed or removed in future versions without notice.

      17:32:32,468 TRACE [org.jboss.as.jpa] (MSC service thread 1-1) returning global (module) Persistence Provider org.hibernate.ejb.HibernatePersistence

      17:32:32,468 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit."myappear.ear"."myapp.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."myappear.ear"."myapp.war".INSTALL: Failed to process phase INSTALL of subdeployment "myapp.war" of deployment "myappear.ear"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.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_24]

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

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

      Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'org.apache.openjpa.persistence.PersistenceProviderImpl' not found

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

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

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

          at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleWarDeployment(PersistenceUnitDeploymentProcessor.java:194)

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

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

          ... 5 more

       

       

      Please help me to resolve this issue.It is very urgent.

       

      Regards,

      Bosco