• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

InstanceAlreadyExistsException when deploying multiple versions of the same persistence unit

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
You may have just won ten million dollars! Or, maybe a tiny ad.
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic