1 Reply Latest reply on May 4, 2004 12:59 PM by aseembansal

    ConcurrentModificationException while deploying MBeans

    aseembansal

      Hi,

      I am trying to deploy my mbeans in JBoss micro kernel, but am getting this exception

      Exception::-

      org.jboss.deployment.DeploymentException: start operation failed on package file
      :/C:/AppServers/JBoss/jboss-4.0.0DR2/server/minimal/conf/jboss-service.xml; - ne
      sted throwable: (java.util.ConcurrentModificationException)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:235)
      at org.jboss.deployment.DeploymentInfo.start(DeploymentInfo.java:255)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:72)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:1036)
      at $Proxy1.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:401)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:72)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:798)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:594)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:558)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:542)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:72)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:172)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:333)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:241)
      at org.jboss.Main.boot(Main.java:165)
      at org.jboss.Main$1.run(Main.java:403)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:762)
      at java.util.HashMap$KeyIterator.next(HashMap.java:798)
      at org.jboss.system.ServiceController.start(ServiceController.java:425)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:72)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:172)
      at $Proxy6.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:227)
      ... 42 more
      22:07:42,328 ERROR [MainDeployer] could not start deployment: file:/C:/AppServer
      s/JBoss/jboss-4.0.0DR2/server/minimal/conf/jboss-service.xml
      MBeanException: org.jboss.deployment.DeploymentException: start operation failed
      on package file:/C:/AppServers/JBoss/jboss-4.0.0DR2/server/minimal/conf/jboss-s
      ervice.xml; - nested throwable: (java.util.ConcurrentModificationException)
      Cause: org.jboss.deployment.DeploymentException: start operation failed on packa
      ge file:/C:/AppServers/JBoss/jboss-4.0.0DR2/server/minimal/conf/jboss-service.xm
      l; - nested throwable: (java.util.ConcurrentModificationException)
      at org.jboss.mx.server.ReflectedDispatcher.handleInvocationExceptions(Re
      flectedDispatcher.java:103)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:76)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:798)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:594)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:558)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:542)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:72)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:172)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:333)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:241)
      at org.jboss.Main.boot(Main.java:165)
      at org.jboss.Main$1.run(Main.java:403)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: org.jboss.deployment.DeploymentException: start operation failed on p
      ackage file:/C:/AppServers/JBoss/jboss-4.0.0DR2/server/minimal/conf/jboss-servic
      e.xml; - nested throwable: (java.util.ConcurrentModificationException)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:235)
      at org.jboss.deployment.DeploymentInfo.start(DeploymentInfo.java:255)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:72)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:155)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:1036)
      at $Proxy1.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:401)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

      JBoss Version ::
      ==========

      22:06:37,109 INFO [Server] Release ID: JBoss [Matrix2] 4.0.0DR2 (build: CVSTag=
      JBoss_4_0_0_DR2 date=200307030107)

      Relevant parts of Jboss-service.xml
      =======================

      <!-- Obj Mgr -->



      <!-- Obj Mgr2 -->




      <!-- Object A -->

      <depends optional-attribute-name="ManagerObj">MyDomain:name=objmgr
      <depends optional-attribute-name="MangerObj2">MyDomain:name=objmgr2



      <!-- Object B -->

      <depends optional-attribute-name="ManagerObj">MyDomain:name=objmgr
      <depends optional-attribute-name="MangerObj2">MyDomain:name=objmgr2



      Seems like its something to do with the same dependencies of Object A and Object B as object A can deployed if Object B is removed from the xml and vice-versa.

      Any clues ?

      -A