PersistenceUnitLoadingException after setting up Eclipselink
seifert Aug 13, 2013 8:41 AMI followed the How to use EclipseLink with AS7-Tutorial ( https://community.jboss.org/wiki/HowToUseEclipseLinkWithAS7#/?page=2 ) to setup JBoss 7.1.1.Final to use Eclipselink 2.5.0:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
<version>2.5.0</version>
</dependency>
Now I am getting the following errors:
14:22:04,349 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."DynamicWebProject.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."DynamicWebProject.war".INSTALL: Failed to process phase INSTALL of deployment "DynamicWebProject.war" 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.runWorker(Unknown Source) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_25] at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25] Caused by: java.lang.NoClassDefFoundError: org/eclipse/persistence/exceptions/PersistenceUnitLoadingException at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.7.0_25] at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) [rt.jar:1.7.0_25] at java.lang.Class.getConstructor0(Unknown Source) [rt.jar:1.7.0_25] at java.lang.Class.getConstructor(Unknown Source) [rt.jar:1.7.0_25] at com.zeroturnaround.javarebel.BP.getConstructor(JRebel:389) [jrebel.jar:201307011846] at java.lang.Class.getConstructor(Unknown Source) [rt.jar:1.7.0_25] at org.jboss.as.jpa.processor.PersistenceProviderProcessor.deploy(PersistenceProviderProcessor.java:77) 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 Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.exceptions.PersistenceUnitLoadingException from [Module "org.eclipse.persistence:main" from local module loader @2dc671b6 (roots: D:\webdev\jboss-as-7.1.1.Final\modules)] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) ... 13 more 14:22:04,403 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "DynamicWebProject.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"DynamicWebProject.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"DynamicWebProject.war\".INSTALL: Failed to process phase INSTALL of deployment \"DynamicWebProject.war\""}} 14:22:04,408 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.deployment.unit."DynamicWebProject.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."DynamicWebProject.war".INSTALL: Failed to process phase INSTALL of deployment "DynamicWebProject.war" 14:22:04,451 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"DynamicWebProject.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"DynamicWebProject.war\".INSTALL: Failed to process phase INSTALL of deployment \"DynamicWebProject.war\""}}}} 14:22:04,586 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment DynamicWebProject.war in 168ms
This is what my persistence.xml looks like:
<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.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_2_0.xsd"> <persistence-unit name="DynamicWebProject"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <properties> <property name="javax.persistence.jtaDataSource" value="java:jboss/datasources/MySQLDS" /> <property name="eclipselink.target-server" value="JBoss"/> <property name="eclipselink.weaving" value="static"/> </properties> </persistence-unit> </persistence>
I would appreciate any effort to help.