2 Replies Latest reply on Apr 22, 2002 9:27 AM by Erik Turesson

    Beans deployed twice

    Erik Turesson Novice

      Hello!

      I am using the latest from CVS and the unpacked ear for deployment.

      Now since the 3.1alpha I get the following error.
      First it deploys my beans ok, but then Jboss tries to deploy the same beans once more. Then an error telling that the bean has already been registerd is shown.

      I have not changed my ear structure or anything else since the 3.0 beta.

      What is wrong?

      /Erik

      2002-04-22 11:15:37,030 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] getObjectName(), name: jboss.management.single:J2EEApplication=scj.ear,J2EEServer=Single,j2eeType=EJBModule,name=sequence.jar
      2002-04-22 11:15:37,030 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] postRegister(), parent: jboss.management.single:J2EEServer=Single,j2eeType=J2EEApplication,name=scj.ear
      2002-04-22 11:15:37,030 INFO [org.jboss.ejb.EjbModule] Deploying SequenceBean
      2002-04-22 11:15:37,040 INFO [org.jboss.ejb.EjbModule] Deploying SequenceSessionBean
      2002-04-22 11:15:37,060 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.j2ee:service=EJB,jndiName=SequenceSessionBean
      2002-04-22 11:15:37,060 DEBUG [org.jboss.system.ServiceController] removing service: jboss.j2ee:service=EJB,jndiName=SequenceSessionBean
      2002-04-22 11:15:37,060 DEBUG [org.jboss.system.ServiceController] removing jboss.j2ee:service=EJB,jndiName=SequenceSessionBean from server
      2002-04-22 11:15:37,060 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.j2ee:service=EJB,jndiName=SequenceBean
      2002-04-22 11:15:37,060 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Cancelling 0 passivation jobs
      2002-04-22 11:15:37,060 DEBUG [org.jboss.system.ServiceController] removing service: jboss.j2ee:service=EJB,jndiName=SequenceBean
      2002-04-22 11:15:37,060 DEBUG [org.jboss.system.ServiceController] removing jboss.j2ee:service=EJB,jndiName=SequenceBean from server
      2002-04-22 11:15:37,060 INFO [org.jboss.ejb.EjbModule] Remove JSR-77 EJB Module: jboss.management.single:J2EEApplication=scj.ear,J2EEServer=Single,j2eeType=EJBModule,name=sequence.jar
      2002-04-22 11:15:37,070 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] preDeregister(), parent: jboss.management.single:J2EEServer=Single,j2eeType=J2EEApplication,name=scj.ear
      2002-04-22 11:15:37,070 ERROR [org.jboss.ejb.EjbModule] Initialization failed
      javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EJB,jndiName=SequenceSessionBean already registered.
      at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:677)
      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:247)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:64)
      at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:51)
      at org.jboss.mx.interceptor.PersistenceInterceptor.invoke(PersistenceInterceptor.java:91)
      at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:75)
      at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:141)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:934)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:276)
      at org.jboss.ejb.EjbModule.createService(EjbModule.java:389)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:134)
      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:867)
      at $Proxy0.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:271)
      at org.jboss.system.ServiceController.create(ServiceController.java:211)
      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 $Proxy5.create(Unknown Source)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:376)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:626)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:620)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:506)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:470)
      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:350)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:530)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:410)
      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:867)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:341)
      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:281)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:665)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:507)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:470)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:452)
      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:320)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:218)
      at org.jboss.Main.boot(Main.java:142)
      at org.jboss.Main$1.run(Main.java:375)
      at java.lang.Thread.run(Thread.java:484)
      2002-04-22 11:15:37,080 ERROR [STDERR] javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EJB,jndiName=SequenceSessionBean already registered.
      2002-04-22 11:15:37,080 ERROR [STDERR] at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:677)
      2002-04-22 11:15:37,080 ERROR [STDERR] at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:247)
      2002-04-22 11:15:37,080 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
      2002-04-22 11:15:37,080 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      2002-04-22 11:15:37,080 ERROR [STDERR] at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:64)
      2002-04-22 11:15:37,080 ERROR [STDERR] at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:51)
      2002-04-22 11:15:37,080 ERROR [STDERR] at org.jboss.mx.interceptor.PersistenceInterceptor.invoke(PersistenceInterceptor.java:91)

        • 1. Re: Beans deployed twice
          Adrian Brock Master

          Does this happen if you stop and restart the server?
          Does this happen with a packed ear? I think there
          are tests in the testsuite for redeploying packed ears.

          I've not had chance to look at the new subdeployer
          processing, so I can't really help you very much :-(

          I would expect to see an undeploy of the EjbModule
          but the undeploy shouldn't be happening anyway?

          Have you tried re-updating from cvs? There were
          some changes went through last night, maybe you only
          got part of it?

          Regards,
          Adrian

          • 2. Re: Beans deployed twice
            Erik Turesson Novice

            Hello!

            Now it works again!
            It was some CVS updates that I did not receive when I did my update this morning.

            Thanks!

            /Erik