[
https://jira.jboss.org/jira/browse/JBAS-6821?page=com.atlassian.jira.plug...
]
Keith Johnston commented on JBAS-6821:
--------------------------------------
Just to clarify:
1. This stack trace occurs as a result of a naming collision between two mbeans used to
manage the persistence units.
2. The persistence units themselves are still located independently in JNDI.
3. Each application will still get the correct persistence unit.
4. The error can essentially be ignored.
PersistenceUnitMetaData mbean id's are not container name
specific.
-------------------------------------------------------------------
Key: JBAS-6821
URL:
https://jira.jboss.org/jira/browse/JBAS-6821
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Deployers, EJB3
Affects Versions: JBossAS-5.0.1.GA
Environment: Win XP
Sun JDK6 32 bit
Reporter: Keith Johnston
Assignee: Carlo de Wolf
= Steps to reproduce =
1. Create a jar containing a META-INF/persistence.xml file.
2. Set the persistence-unit@name attribute to 'test'.
3. Wrap the jar inside an ear archive -> 'foo.ear'
4. Deploy the ear to jBoss -> works ok.
5. Rename the ear to 'bar.ear'
6. Deploy to jBoss -> javax.management.InstanceAlreadyExistsException is thrown, stack
trace follows:
16:29:05,285 WARN [AbstractDeploymentContext] Unable to register deployment mbean
org.jboss.metadata.jpa.spec.PersistenceUnitMetaData.test
javax.management.InstanceAlreadyExistsException:
jboss.deployment:id="org.jboss.metadata.jpa.spec.PersistenceUnitMetaData.test",type=Component
already registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
at
org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
at
org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:990)
at
org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.addComponent(AbstractDeploymentContext.java:719)
at
org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.addComponent(AbstractDeploymentUnit.java:249)
at
org.jboss.jpa.deployers.AbstractDeploymentVisitor.addComponent(AbstractDeploymentVisitor.java:49)
at
org.jboss.jpa.deployers.AbstractDeploymentVisitor.deploy(AbstractDeploymentVisitor.java:64)
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployerWithInput.deploy(AbstractRealDeployerWithInput.java:125)
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployerWithInput.internalDeploy(AbstractRealDeployerWithInput.java:102)
at
org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer.internalDeploy(AbstractComponentDeployer.java:78)
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
= Expected Behaviour =
Include the container name in the mbean id:
* org.jboss.metadata.jpa.spec.PersistenceUnitMetaData.foo.test
* org.jboss.metadata.jpa.spec.PersistenceUnitMetaData.bar.test
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira