0 Replies Latest reply on Aug 20, 2015 11:37 AM by Anirban Banerjee

    JNDI for AMQ connection factory didn't bind after Jboss [ JBoss EAP 6.1.1.GA] started

    Anirban Banerjee Newbie

      Hello,

       

      I have followed the steps mentioned in below guide for integrating ActiveMQ as an internal messaging broker

       

      Integration of JBoss AS 7 with ActiveMQ

       

       

      Snippet from standalone-full.xml

              <subsystem xmlns="urn:jboss:domain:ejb3:1.4">

                  <session-bean>

                      <stateless>

                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                      </stateless>

                      <stateful default-access-timeout="5000" cache-ref="simple"/>

                      <singleton default-access-timeout="5000"/>

                  </session-bean>

                  <mdb>

                      <resource-adapter-ref resource-adapter-name="activemq-ra.rar"/>

                      <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                  </mdb>

                  ....

               </subsystem>

              .....

              <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">

                  <resource-adapters>

                      <resource-adapter id="activemq-ra.rar" activate="true">

                          <archive>

                              activemq-ra.rar

                          </archive>

                          <transaction-support>XATransaction</transaction-support>

                          <config-property name="ServerUrl">

                              vm://transport

                          </config-property>

                          <connection-definitions>

                              <connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:/activemq/QueueConnectionFactory" enabled="true" use-java-context="true" pool-name="AMQConnectionFactory">

                                  <xa-pool>

                                      <min-pool-size>1</min-pool-size>

                                      <max-pool-size>20</max-pool-size>

                                  </xa-pool>

                              </connection-definition>

                          </connection-definitions>

                          <admin-objects>

                              <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/activemq/testQueue" use-java-context="true" pool-name="TestQueue">

                                  <config-property name="PhysicalName">

                                      testQueue

                                  </config-property>

                              </admin-object>

                          </admin-objects>

                      </resource-adapter>

                  </resource-adapters>

              </subsystem>

       

      When I start the server I don't see java:/activemq/QueueConnectionFactory getting bind which is obviously contributing the following error while I try to deploy ear.

       

      I have started the server using -c standalone-full.xml option.


      Server startup log:

      10:51:17,886 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      10:51:17,974 INFO  [org.hornetq.core.server] (MSC service thread 1-1) HQ221020: Started Netty Acceptor version 3.6.6.Final-redhat-1-fd3c6b7 0.0.0.0:5455 for CORE protocol

      10:51:17,981 INFO  [org.hornetq.core.server] (MSC service thread 1-1) HQ221020: Started Netty Acceptor version 3.6.6.Final-redhat-1-fd3c6b7 0.0.0.0:5445 for CORE protocol

      10:51:17,990 INFO  [org.hornetq.core.server] (MSC service thread 1-1) HQ221007: Server is now live

      10:51:17,990 INFO  [org.hornetq.core.server] (MSC service thread 1-1) HQ221001: HornetQ Server version 2.3.5.Final-redhat-2 (Monster Bee, 123) [f8e18796-4686-11e5-88b8-e7193ed4b35f]

      10:51:18,100 INFO  [org.jboss.as.messaging] (ServerService Thread Pool -- 58) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory

      10:51:18,110 INFO  [org.hornetq.jms.server] (ServerService Thread Pool -- 59) HQ121005: Invalid "host" value "0.0.0.0" detected for "netty" connector. Switching to "****.net". If this new address is incorrect please manually configure the connector to use the proper one.

      10:51:18,120 INFO  [org.jboss.as.messaging] (ServerService Thread Pool -- 59) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory

      10:51:18,228 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-1) JBAS010406: Registered connection factory java:/JmsXA

      10:51:18,315 INFO  [org.hornetq.ra] (MSC service thread 1-1) HornetQ resource adaptor started

      10:51:18,316 INFO  [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-1) IJ020002: Deployed: file://RaActivatorhornetq-ra

      10:51:18,323 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-2) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]

      10:51:18,454 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://0.0.0.0:9990/management

      10:51:18,454 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990

      10:51:18,459 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.1.1.GA (AS 7.2.1.Final-redhat-10) started in 8785ms - Started 151 of 213 services (61 services are passive or on-demand)

       

      Ear deployment log:

      10:23:46,846 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."*.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."*.ear".WeldStartService: Failed to start service

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [rt.jar:1.6.0_34]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.6.0_34]

              at java.lang.Thread.run(Thread.java:701) [rt.jar:1.6.0_34]

      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Set<Service>] with qualifiers [@Default] at injection point [[parameter 1] of [constructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>)]

              at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)

              at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)

              at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143)

              at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)

              at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)

              at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:367)

              at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)

              at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)

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

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

              ... 3 more

       

       

      10:23:46,992 ERROR [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS015870: Deploy of deployment "*.ear" was rolled back with the following failure message:

      {

          "JBAS014671: Failed services" => {"jboss.deployment.unit.\"**.ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"**.ear\".WeldStartService: Failed to start service

          Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Set<Service>] with qualifiers [@Default] at injection point [[parameter 1] of [constructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>)]"},

          "JBAS014771: Services with missing/unavailable dependencies" => [

              "jboss.naming.context.java.comp.**.Consumption.\"Consumer\".env.\"**\".amqConnectionFactory is missing [jboss.naming.context.java.activemq.QueueConnectionFactory]",

              "jboss.deployment.subunit.\"**\".\"Consumption.jar\".component.\"**\".CREATE is missing [jboss.ra.activemq-ra]",

              .....

          ]

      }