0 Replies Latest reply on Oct 9, 2002 4:33 PM by ankur agrawal

    Deployment error:InstanceAlreadyExists: MBean/EJBs

    ankur agrawal Newbie

      Hi,

      I am getting a deployment error: InstanceAlreadyExistsException. Here are the details:

      I have some jar files in the deploy directory, and a jmx service that uses some of these jar files.

      Here's the relevant snippet from the service.xml file:
      The archives are the jar files in deploy directory that the mbean class needs.




      ivast:Service=SchedulerService
      ivast:service=config


      When I start Jboss, it tries to deploy this service.xml file, and so it deploys the jar files.
      It successfully deploys ivUser.jar, and then it tries to deploy ivUserAdmin.jar, which has a dependency on ivUser.jar. At this point, it throws the exception. The log file's relevant section is printed below.

      The service actually starts and works properly, but any code that tries to get to the User EJB, gets an error, "UserAdmin" not bound.

      If, on the other hand, I remove this mbean from the service.xml file, everything works fine.

      Anyone has any pointers to what could resolve this ?

      TIA
      Ankur

      --------------------------------------------------

      2002-10-09 12:17:00,077 DEBUG [org.jboss.ejb.EJBDeployer] Deployed: file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] Final (start) deployment step successfully completed on package: ivUser.jar
      2002-10-09 12:17:00,077 INFO [org.jboss.deployment.MainDeployer] Successfully completed deployment of package: file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] found 1 subpackages of file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUserAdmin.jar
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.ejb.EJBDeployer@1e8f17
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUserAdmin.jar
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUserAdmin.jar
      2002-10-09 12:17:00,077 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar
      2002-10-09 12:17:00,108 DEBUG [org.jboss.ejb.EJBDeployer] Verifying file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar
      2002-10-09 12:17:00,124 DEBUG [org.jboss.ejb.EJBDeployer] User: Verified.
      2002-10-09 12:17:00,124 INFO [org.jboss.ejb.EjbModule] Registration is not done -> destroy
      2002-10-09 12:17:00,124 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
      2002-10-09 12:17:00,124 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=true
      2002-10-09 12:17:00,124 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
      2002-10-09 12:17:00,124 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar
      org.jboss.deployment.DeploymentException: error in create of EjbModule: file:/C:/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar; - nested throwable: (javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EjbModule,url=file%/C%/jboss 3.0/jboss-3.0.0/server/default/deploy/ivUser.jar already registered.)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:384)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:631)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy2.deploy(Unknown Source)
      at org.jboss.deployment.SARDeployer.parseXMLClasspath(SARDeployer.java:465)
      at org.jboss.deployment.SARDeployer.init(SARDeployer.java:155)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:556)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:501)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:586)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:465)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:237)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:340)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:243)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:465)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:314)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:216)
      at org.jboss.Main.boot(Main.java:142)
      at org.jboss.Main$1.run(Main.java:375)
      at java.lang.Thread.run(Thread.java:479)




      ---------------------------------------------------
      Jboss starts up neverthless, and the service is running, but my EJB clients are not able to get hold of EJBs inside the ivUser.jar. Here's the exception I get if I try:

      -----------------------------------------------------
      Oct 09 12:38:25 ERROR naming.HomeFactory [Thread-12] () - naming excpetion
      javax.naming.NameNotFoundException: com.ivast.server.UserAdmin not bound
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:240)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:445)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:429)
      at javax.naming.InitialContext.lookup(InitialContext.java:345)
      at com.ivast.common.naming.HomeFactory.lookupObject(HomeFactory.java:79)
      at com.ivast.common.naming.HomeFactory.getHomeInterface(HomeFactory.java:42)
      at com.ivast.server.EJB.RemoteObjectFactory.getUserAdmin(RemoteObjectFactory.java:64)
      at com.ivast.server.EJB.Authenticator.login(Authenticator.java:46)
      at com.ivast.client.logon.LogonAction.perform(LogonAction.java:52)
      at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
      at org.apache.tomcat.core.Handler.service(Handler.java:287)
      at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
      at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
      at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
      at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
      at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
      at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
      at java.lang.Thread.run(Thread.java:479)

      -------------------------------------------------------