| Author |
InstanceAlreadyExistsException when deploying multiple versions of the same persistence unit
|
Nick Stolwijk
Greenhorn
Joined: Apr 28, 2010
Posts: 1
|
|
I want to deploy 2 war files to the same JBoss instance, but each one uses the same domain jar file (included in the war file) and thus the same persistence unit.
JBoss fails to deploy these two war files together with the following:
2010-04-28 15:41:15,199 WARN [org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext] (main) Unable to register deployment mbean org.jboss.metadata.jpa.spec.PersistenceUnitMetaData.MyPersistenceUnit
javax.management.InstanceAlreadyExistsException: jboss.deployment:id="org.jboss.metadata.jpa.spec.PersistenceUnitMetaData.MyPersistenceUnit",type=Component already registered.
2010-04-28 15:41:15,206 WARN [org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext] (main) Unable to register deployment mbean persistence.unit:unitName=#MyPersistenceUnit
javax.management.InstanceAlreadyExistsException: jboss.deployment:id="persistence.unit:unitName=#MyPersistenceUnit",type=Component already registered.
2010-04-28 15:41:15,225 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfszip:/opt/jboss-5.1.0.GA/server/myserver/deploy/my-second-war-2.2.0-SNAPSHOT.war/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying: persistence.unit:unitName=#MyPersistenceUnit
According to this thread the warnings can be ignored and the app should deploy regardless. However, in my instance, this warning also results in an error and the second war isn't deployed.
Is it somehow possible to deploy two war files with the same persistence unit in one JBoss instance?
|
 |
 |
|
|
subject: InstanceAlreadyExistsException when deploying multiple versions of the same persistence unit
|
|
|