Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-2124

IllegalStateException thrown during deployment when processing EJB metrics on .ear that contains beans with same name in different ejb.jars

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EAP 5.0.0.BETA
    • None
    • EJB
    • None

      Test archive:
      JBPAPP_5_0/testsuite/output/lib/refspath.ear

      This ear contains two ejb.jars:
      refspath-ejb1.jar
      refspath-ejb2.jar

      The ejb class names within the .jars are unique but they use the same name; i.e.,
      @Stateless(name = "EJB")

      causing the deployment to fail as the refspath.ear-EJB-metrics-instance is "already installed".

      16:22:33,526 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@31e831e8

      {name=jboss.j2ee:ear=refspath.ear,jar=refspath-ejb1.jar,name=EJB,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}

      16:22:33,526 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@46bc46bc

      {name=jboss.j2ee:ear=refspath.ear,jar=refspath-ejb2.jar,name=EJB,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}

      16:22:33,527 INFO [Ejb3MetricsDeployer] Attaching MC Bean: refspath.ear-EJB-metrics-instance
      16:22:33,527 INFO [Ejb3MetricsDeployer] Attaching MC Bean: refspath.ear-EJB-metrics-invocation
      16:22:33,527 INFO [Ejb3MetricsDeployer] Attaching MC Bean: refspath.ear-EJB-metrics-instance
      16:22:33,527 INFO [Ejb3MetricsDeployer] Attaching MC Bean: refspath.ear-EJB-metrics-invocation
      16:22:33,539 WARN [AbstractDeploymentContext] Unable to register deployment mbean refspath.ear-EJB-metrics-instance
      javax.management.InstanceAlreadyExistsException: jboss.deployment:id="refspath.ear-EJB-metrics-instance",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)
      Caused by:
      java.lang.IllegalStateException: refspath.ear-EJB-metrics-instance 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.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
      at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
      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 <unknown class>.<unknown method>(Unknown Source)
      ... 26 more
      16:22:34,265 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:/work/EAP5/JBPAPP_5_0/build/output/jboss-5.0.0.Beta/server/default/deploy/refspath.ear/ -> org.jboss.deployers.spi.DeploymentException: Error deploying: refspath.ear-EJB-metrics-instance

              arubinge@redhat.com Andrew Rubinger (Inactive)
              smcgowan@redhat.com Shelly McGowan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: