6 Replies Latest reply: Jan 20, 2012 8:36 PM by Stan Brown RSS

ActivationSpec.setResourceAdapter called twice on the same ActivationSpec instance

Stan Brown Newbie

I'm running jboss-as-7.0.2.Final.  And I have a situation where setResourceAdapter is being called twice on the same the ActivationSpec instance.  I have three MDBs accessing the same resource adapter instance.  Here's part of the log:

 

 

14:13:18,492 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.2.Final "Arc" started in 1512ms - Started 94 of 149 services (55 services are passive or on-demand)

14:14:18,599 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "jrac-simple.rar"

14:14:18,973 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api dependency to jrac-simple.rar

14:14:19,099 INFO  [stdout] (MSC service thread 1-5) >>>> made setResourceAdapter: activationSpec = com.unisys.coms.connector.COMSActivationSpec@1256a73 -  4bc11a8e:134e894e0c2:07ffd

14:14:19,099 INFO  [stdout] (MSC service thread 1-5) >>>> made setResourceAdapter: resourceAdapter= com.unisys.coms.connector.COMSResourceAdapter@19c21b

14:14:19,141 INFO  [org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService$AS7RaDeployer] (MSC service thread 1-5) IJ020002: Deployed: file:/F:/jboss-as-7.0.2.Final/standalone/tmp/vfs/temp5bdb9eed1653ea45/jrac-simple.rar-f74d935d3711582a/contents/

14:14:19,217 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "jrac-simple.rar"

14:14:34,281 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "jrac-simpleEJB.jar"

14:14:34,360 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added javax.persistence.api dependency to jrac-simpleEJB.jar

14:14:34,468 INFO  [stdout] (MSC service thread 1-2) >>>> made setResourceAdapter: activationSpec = com.unisys.coms.connector.COMSActivationSpec@1c27402 -  4bc11a8e:134e894e0c2:07ff2

14:14:34,468 INFO  [stdout] (MSC service thread 1-2) >>>> made setResourceAdapter: resourceAdapter= com.unisys.coms.connector.COMSResourceAdapter@19c21b

14:14:34,468 INFO  [stdout] (MSC service thread 1-3) >>>> made setResourceAdapter: activationSpec = com.unisys.coms.connector.COMSActivationSpec@10651eb -  4bc11a8e:134e894e0c2:07ff0

14:14:34,469 INFO  [stdout] (MSC service thread 1-3) >>>> made setResourceAdapter: resourceAdapter= com.unisys.coms.connector.COMSResourceAdapter@19c21b

14:14:34,470 INFO  [stdout] (MSC service thread 1-4) >>>> made setResourceAdapter: activationSpec = com.unisys.coms.connector.COMSActivationSpec@14e5d57 -  4bc11a8e:134e894e0c2:07ff1

14:14:34,470 INFO  [stdout] (MSC service thread 1-4) >>>> made setResourceAdapter: resourceAdapter= com.unisys.coms.connector.COMSResourceAdapter@19c21b

14:14:34,520 INFO  [stdout] (MSC service thread 1-2) >>>> made setServiceName: serviceName = RecordService

14:14:34,521 INFO  [stdout] (MSC service thread 1-4) >>>> made setServiceName: serviceName = TextService

14:14:34,521 INFO  [stdout] (MSC service thread 1-3) >>>> made setServiceName: serviceName = ByteService

14:14:34,523 INFO  [stdout] (MSC service thread 1-2) >>>> made setResourceAdapter: activationSpec = com.unisys.coms.connector.COMSActivationSpec@1c27402 -  4bc11a8e:134e894e0c2:07ff2

14:14:34,523 INFO  [stdout] (MSC service thread 1-3) >>>> made setResourceAdapter: activationSpec = com.unisys.coms.connector.COMSActivationSpec@10651eb -  4bc11a8e:134e894e0c2:07ff0

14:14:34,524 INFO  [stdout] (MSC service thread 1-4) >>>> made setResourceAdapter: activationSpec = com.unisys.coms.connector.COMSActivationSpec@14e5d57 -  4bc11a8e:134e894e0c2:07ff1

14:14:34,537 INFO  [stdout] (MSC service thread 1-4) >>>> made setResourceAdapter: resourceAdapter= com.unisys.coms.connector.COMSResourceAdapter@19c21b

14:14:34,537 INFO  [stdout] (MSC service thread 1-3) >>>> made setResourceAdapter: resourceAdapter= com.unisys.coms.connector.COMSResourceAdapter@19c21b

14:14:34,538 INFO  [stdout] (MSC service thread 1-2) >>>> made setResourceAdapter: resourceAdapter= com.unisys.coms.connector.COMSResourceAdapter@19c21b

14:14:34,538 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."jrac-simpleEJB.jar".component.SimpleRecordBean.CREATE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jrac-simpleEJB.jar".component.SimpleRecordBean.CREATE: Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1780)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]

        at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

Caused by: java.lang.RuntimeException: javax.resource.spi.ResourceAdapterInternalException: ResourceAdapter instance already associated - com.unisys.coms.connector.COMSActivationSpec@1c27402 -  4bc11a8e:134e894e0c2:07ff2, error code: ERROR-GEN-006

        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:85)

        at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:78)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

        ... 3 more

Caused by: javax.resource.spi.ResourceAdapterInternalException: ResourceAdapter instance already associated - com.unisys.coms.connector.COMSActivationSpec@1c27402 -  4bc11a8e:134e894e0c2:07ff2, error code: ERROR-GEN-006

        at com.unisys.coms.connector.COMSActivationSpec.setResourceAdapter(COMSActivationSpec.java:512)

        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:83)

        ... 6 more

 

 

14:14:34,538 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."jrac-simpleEJB.jar".component.SimpleByteBean.CREATE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jrac-simpleEJB.jar".component.SimpleByteBean.CREATE: Failed to start service

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

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]

        at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

Caused by: java.lang.RuntimeException: javax.resource.spi.ResourceAdapterInternalException: ResourceAdapter instance already associated - com.unisys.coms.connector.COMSActivationSpec@10651eb -  4bc11a8e:134e894e0c2:07ff0, error code: ERROR-GEN-006

        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:85)

        at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:78)

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

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

        ... 3 more

Caused by: javax.resource.spi.ResourceAdapterInternalException: ResourceAdapter instance already associated - com.unisys.coms.connector.COMSActivationSpec@10651eb -  4bc11a8e:134e894e0c2:07ff0, error code: ERROR-GEN-006

        at com.unisys.coms.connector.COMSActivationSpec.setResourceAdapter(COMSActivationSpec.java:512)

        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:83)

        ... 6 more

 

 

14:14:34,538 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."jrac-simpleEJB.jar".component.SimpleTextBean.CREATE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jrac-simpleEJB.jar".component.SimpleTextBean.CREATE: Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1780)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]

        at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

Caused by: java.lang.RuntimeException: javax.resource.spi.ResourceAdapterInternalException: ResourceAdapter instance already associated - com.unisys.coms.connector.COMSActivationSpec@14e5d57 -  4bc11a8e:134e894e0c2:07ff1, error code: ERROR-GEN-006

        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:85)

        at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:78)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

        ... 3 more

Caused by: javax.resource.spi.ResourceAdapterInternalException: ResourceAdapter instance already associated - com.unisys.coms.connector.COMSActivationSpec@14e5d57 -  4bc11a8e:134e894e0c2:07ff1, error code: ERROR-GEN-006

        at com.unisys.coms.connector.COMSActivationSpec.setResourceAdapter(COMSActivationSpec.java:512)

        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:83)

        ... 6 more

 

 

14:14:34,812 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "jrac-simpleEJB.jar" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleTextBean.CREATE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleTextBean.CREATE: Failed to start service","jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleRecordBean.CREATE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleRecordBean.CREATE: Failed to start service","jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleByteBean.CREATE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleByteBean.CREATE: Failed to start service"}}

14:14:34,846 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Stopped deployment jrac-simpleEJB.jar in 35ms

14:14:34,847 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleTextBean.CREATE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleTextBean.CREATE: Failed to start service","jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleRecordBean.CREATE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleRecordBean.CREATE: Failed to start service","jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleByteBean.CREATE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jrac-simpleEJB.jar\".component.SimpleByteBean.CREATE: Failed to start service"}}}}

 

 

From the log, it looks like the ActivationSpecs are being called twice, for example COMSActivationSpec@1c27402.   We throw an exception under these circumstances since the Connector Architecture spec states that setResourceAdapter should only be called once.  Is there some configuration to get around this issue?

 

Thanks.