[jboss-dev-forums] [Design of EJB 3.0] - Unable to register deployment mbean org.jboss.metadata.jpa.s

johk do-not-reply at jboss.com
Fri Apr 24 01:33:03 EDT 2009


I have a JEE 5 ear file.
The ear file contains a regular jar file used for JPA persistence, with a persistence.xml file in the META-INF folder.
The first time I deploy the application everything goes fine. If I rename the ear and deploy the application I get the following error:


  | 16:29:05,285 WARN  [AbstractDeploymentContext] Unable to register deployment mbean org.jboss.metadata.jpa.spec.PersistenceUnitMetaData.ccc-persistence
  | javax.management.InstanceAlreadyExistsException: jboss.deployment:id="org.jboss.metadata.jpa.spec.PersistenceUnitMetaData.ccc-persistence",
  | 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)
  | 16:29:05,332 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=application-ear-1.ear/lib/core-domain-7.0.0-SNAPSHOT.jar#ccc-persistence
  | 16:29:05,379 WARN  [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
  | 

It seems that the id generated for the PersistenceUnitMetaData isn't scoped to the name of the ear file? Or am I missing some configuration somewhere?

Environment:
Windows XP
jBoss-5.0.1-GA-jdk6
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226442#4226442

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226442



More information about the jboss-dev-forums mailing list