Getting DuplicateServiceException: Service jboss.pe rsistenceunit.\"webExample.war#org.jbpm.persistence.jpa\".__FIR ST_PHASE__ is already registered"}}
buch11 Apr 30, 2015 6:52 AMhey,
After my first post, I was ablr to get the wildfly up and running along with "jbpm-console.war". Now I took the generated bpmn2 file, placed it in the classpath, generated a deployable .war file of the project. When I try to deploy this war in wildfly, i am getting the error:
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.pe
rsistenceunit.\"jbpm-example-1.0.0-SNAPSHOT.war#org.jbpm.persistence.jpa\".__FIR
ST_PHASE__ is already registered"}}
.
.
.
15:19:08,391 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC0000
01: Failed to start service jboss.deployment.unit."jbpm-example-1.0.0-SNAPSHOT.w
ar".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.depl
oyment.unit."jbpm-example-1.0.0-SNAPSHOT.war".FIRST_MODULE_USE: JBAS018733: Fail
ed to process phase FIRST_MODULE_USE of deployment "jbpm-example-1.0.0-SNAPSHOT.
war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deplo
ymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Se
rviceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont
rollerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1110) [rt.jar:1.7.0_10-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:603) [rt.jar:1.7.0_10-ea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10-ea]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBA
S011446: Failed to add persistence unit service for org.jbpm.persistence.jpa
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deployPersis
tenceUnitPhaseOne(PersistenceUnitServiceHandler.java:551)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService
(PersistenceUnitServiceHandler.java:264)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleWarDep
loyment(PersistenceUnitServiceHandler.java:191)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(Persi
stenceUnitServiceHandler.java:126)
at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(Pe
rsistenceBeginInstallProcessor.java:52)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deplo
ymentUnitPhaseService.java:159) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
... 5 more
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.persis
tenceunit."jbpm-example-1.0.0-SNAPSHOT.war#org.jbpm.persistence.jpa".__FIRST_PHA
SE__ is already registered
I tried renaming the PU name in my persistance.xml file, too. That dint help either. What am I missing out here?
my Persistence.xml is as below: (PU name changed back to the orignal)
=======================================================
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
<properties>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
<property name="hibernate.id.new_generator_mappings" value="false" />
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform" />
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
<property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost/~/jbpm-db;MVCC=TRUE" />
<property name="hibernate.connection.username" value="sa"/>
<property name="hibernate.connection.password" value=""/>
</properties>
</persistence-unit>
</persistence>
=======================================================