[jboss-user] [Installation, Configuration & Deployment] - Deployment "InstanceAlreadyExistsException" for Hibernate MB

cdub do-not-reply at jboss.com
Mon Sep 14 17:46:52 EDT 2009


I have a Java App that uses Hibernate that I'm trying to deploy on JBOSS 5.1.0. I get the following "InstanceAlreadyExistsException" when trying to deploy it. I've removed the JBOSS "tmp" and "work" directories and restarted JBOSS as suggested in another post online  as well as tried renaming the MBean just in case there really was a conflict but I'm still getting the same error. 

Following is exception stack trace as well as the contents of the "jboss-app.xml" and "hibernate-service.xml" files.

Any ideas out there guys ?

Exception Stack Trace

  | 16:27:07,977 WARN  [AbstractDeploymentContext] Unable to register deployment mbean jboss.gggomobile:name=GGGoMobileSessionFactory
  | javax.management.InstanceAlreadyExistsException: jboss.deployment:id="jboss.gggomobile:name=GGGoMobileSessionFactory",type=Component already registered.
  |         at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:756)
  |         at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:233)
  |         at sun.reflect.GeneratedMethodAccessor75.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:1030)
  |         at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.addComponent(AbstractDeploymentContext.java:722)
  |         at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.addComponent(AbstractDeploymentUnit.java:251)
  |         at org.jboss.system.deployers.ServiceDeploymentDeployer.addServiceComponent(ServiceDeploymentDeployer.java:62)
  |         at org.jboss.system.deployers.ServiceDeploymentDeployer$ServiceDeploymentVisitor.deploy(ServiceDeploymentDeployer.java:115)
  |         at org.jboss.system.deployers.ServiceDeploymentDeployer$ServiceDeploymentVisitor.deploy(ServiceDeploymentDeployer.java:76)
  |         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:1631)
  |         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  |         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
  |         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:702)
  |         at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
  |         at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
  |         at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
  |         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:886)
  |         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  |         at java.lang.Thread.run(Thread.java:619)
  | 16:27:08,391 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/JBoss/jboss-5.1.0.GA/server/default/deploy/GGGoMobile.ear/ state=PreReal mode=Manual requiredState=Real
  | org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.gggomobile:name=GGGoMobileSessionFactory
  |         at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
  |         at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)
  |         at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
  |         at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
  |         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:1178)
  |         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:1631)
  |         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  |         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
  |         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:702)
  |         at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
  |         at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
  |         at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
  |         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:886)
  |         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  |         at java.lang.Thread.run(Thread.java:619)
  | Caused by: java.lang.IllegalStateException: jboss.gggomobile:name=GGGoMobileSessionFactory is already installed.
  |         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:716)
  |         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
  |         at org.jboss.system.ServiceController.doInstall(ServiceController.java:670)
  |         at org.jboss.system.ServiceController.install(ServiceController.java:273)
  |         at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:90)
  |         ... 30 more
  | 16:27:08,823 WARN  [HDScanner] Failed to process changes
  | org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
  | 
  | *** DEPLOYMENTS IN ERROR: Name -> Error
  | 
  | vfszip:/C:/JBoss/jboss-5.1.0.GA/server/default/deploy/GGGoMobile.ear/ -> org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.gggomobile:name=GGGoMobileSessionFactory
  | 
  | 
  | DEPLOYMENTS IN ERROR:
  |   Deployment "vfszip:/C:/JBoss/jboss-5.1.0.GA/server/default/deploy/GGGoMobile.ear/" is in error due to the following reason(s): java.lang.IllegalStateException: jboss.gggomobile:name=GGGoMobileSessionFactory is already installed.
  | 
  |         at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
  |         at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
  |         at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
  |         at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
  |         at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
  |         at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
  |         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:886)
  |         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  |         at java.lang.Thread.run(Thread.java:619)
  | 

jboss-app.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <jboss-app>
  |    <loader-repository>
  |     com.clarksonville.gm.data:loader=GGGoMobile.ear 
  |    </loader-repository>
  |     <module>
  |         <service>META-INF/hibernate-service.xml</service>
  |     </module>
  | </jboss-app>
  | 

hibernate-service.xml

  | <?xml version="1.0" encoding="utf-8"?>
  | <server>
  | <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.gggomobile:name=GGGoMobileSessionFactory">
  |         <attribute name="DatasourceName">java:/GGGoMobileDS</attribute>
  |         <attribute name="Dialect"> 
  |             org.hibernate.dialect.MySQLDialect
  |         </attribute>
  |         <attribute name="SessionFactoryName">
  |             java:/hibernate/GGGoMobileSessionFactory
  |         </attribute>
  |         <attribute name="CacheProviderClass">
  |             org.hibernate.cache.HashtableCacheProvider
  |         </attribute>
  |         <attribute name="ShowSqlEnabled">true</attribute>
  | 	<attribute name="ScanForMappingsEnabled">true</attribute>
  |     </mbean>	
  | </server>
  | 

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

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



More information about the jboss-user mailing list