1 Reply Latest reply on Sep 9, 2013 9:36 AM by Justin Bertram

    ACTIVEMQ resource-adapter deployment

    michel777 Newbie

      Hello

      I try to deploy activemq 5.8.0 resource adapter in Jboss 7.1.1 (standalone) using jboss-cli.

      This is my actions

      [standalone@localhost:9999 /] deploy /tmp/activemq-rar-5.8.0.rar  --> JBAS018559: Deployed "activemq-rar-5.8.0.rar"

      [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar-5.8.0.rar:add(archive=activemq-rar-5.8.0.rar,transaction-support=NoTransaction)

      {"outcome" => "success"}

      [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar-5.8.0.rar/config-properties=ServerUrl/:add(value=localhost:61616)

      {"outcome" => "success"}

      [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar-5.8.0.rar/connection-definitions=cf/:add(class-name=org.apache.activemq.ra.ActiveMQManagedConnectionFactory, jndi-name=java:/amq/JmsCF)

      {"outcome" => "success"}

      [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar-5.8.0.rar/admin-objects=Queue/:add(class-name=org.apache.activemq.command.ActiveMQQueue, jndi-name=java:/amq/JmsQueue)

      {"outcome" => "success"}

      [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar-5.8.0.rar/admin-objects=Queue/config-properties=PhysicalName/:add(value=MYQUEUE)

      {"outcome" => "success"}

      [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=activemq-rar-5.8.0.rar:activate

      {"outcome" => "success"}

      But in the Jboss log I have :

      11:43:33,981 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-1) JBAS010406: Registered connection factory java:/amq/JmsCF

      11:43:33,988 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-1) JBAS010406: Registered connection factory java:/amq/JmsCF

      11:43:33,991 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.ra.deployment."activemq-rar-5.8.0.rar_1": org.jboss.msc.service.StartException in service jboss.ra.deployment."activemq-rar-5.8.0.rar_1": org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [activemq-rar-5.8.0]

        at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:127)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [classes.jar:1.6.0_43]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [classes.jar:1.6.0_43]

        at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_43]

      Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [activemq-rar-5.8.0]

        at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:111)

        ... 5 more

      Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/Users/michel/Developpement/Servers/JBoss/jboss-as-7.1.1.Final/standalone/tmp/vfs/temp24b932307dc8cef4/content-57e17fe0e2fe89c5/contents/

        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2186)

        at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService$AS7RaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:178)

        at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:104)

        ... 5 more

      Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.connector.connection-factory.java:/amq/JmsCF is already registered

        at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.as.connector.metadata.deployment.AbstractResourceAdapterDeploymentService$AbstractAS7RaDeployer.bindConnectionFactory(AbstractResourceAdapterDeploymentService.java:269)

        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1956)

        ... 7 more

      11:43:34,027 INFO  [org.jboss.as.controller] (management-handler-thread - 1) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.ra.deployment."activemq-rar-5.8.0.rar_1": org.jboss.msc.service.StartException in service jboss.ra.deployment."activemq-rar-5.8.0.rar_1": org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [activemq-rar-5.8.0]

       

      I retried it several times (with a new Jboss 7.1.1 installation) but I have the same error. Why jndi resource already exists or rather why registring is done twice ?

      Can you help me?