4 Replies Latest reply on Jul 29, 2016 8:06 AM by fwelland

    JBOSS EAP 7.0.1 and a RAR to an external Q Broker

    fwelland

      I have a war that has being working just fine under EAP 6.4.x  (x currently 8, but also under 6 and 4 and so on down to 6.4.0).   

       

      The WAR has some simple JMS client features to adding a message to a queue on a remote machine.      The target QBroker is ActiveMQ  5.8.0.   

       

      I use the 5.8.0 RAR to set up an adapter/connector to the remote broker and then just normal JMS client stuff to push a message into a q.    All is fine with this.

       

      Beginning the "port" from 6.4.x to 7.0.1; and I am hung up on the amq 5.8.0 RAR stuff.     For starters -- not going to use any of the AMQ Artemis stuff that part of EAP 7 (yet).   Initially I want to get my WAR working under 7.0 with as few changes as possible -- so leaving RAR in place is important.

       

      Under 6.4.0, I use the standalone profile and just deploy the RAR via CLI kinda like this:

       

      ./jboss-cli.sh --connect -c "deploy --name=${AMQ_DEPLOY_NAME} --runtime-name=${AMQ_RAR_FNAME} ${_TMPDIR}/${AMQ_RAR_FNAME}"

       

      I then use cli to set up resource adapter, connection def/factory and admin-object for the queue.  

       

      Following the same process with EAP 7.0.1, if I use the standalone profile I get

       

      java.lang.NoClassDefFoundError: javax/jms/JMSException

       

      issues.    Ok so when I used standalone-full I get all sorts of variations of this sort of error:

       

      2016-07-18 15:48:10,867 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "messaging-activemq"),

          ("server" => "default")

      ]) - failure description: {

          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.messaging-activemq.default is missing [jboss.http-upgrade-registry.default]"],

          "WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {

              "Services that were unable to start:" => ["jboss.messaging-activemq.default.jms.manager"],

              "Services that may be the cause:" => [

                  "jboss.http-upgrade-registry.default",

                  "jboss.naming.context.java.JmsXA"

              ]

          }

      }

       

      The above messages suggest something is wrong with the messaging-activemq stuff (the built in artemis stuff).  

       

      In both cases, I do set my EJB default resource adapter to the RAR created above.  

       

      So what am I missing on this set up?     

       

       

      Some particulars about my Environment:

       

      War doesn't have any jboss/wildfly specific DDs in it.


      I do not have the AMQ RAR deployed as a static module (nor do I want to)  -- it is just a jar I have deployed - like other JAR (for DB drivers) or WARS, EJB jars, etc.


      cat version.txt

      Red Hat JBoss Enterprise Application Platform - Version 7.0.1.GA

       

      java -version

      java version "1.8.0_92"

      Java(TM) SE Runtime Environment (build 1.8.0_92-b14)

      Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

       

      uname -a

      Linux wellandf3 4.6.4-301.fc24.x86_64 #1 SMP Tue Jul 12 11:50:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

        • 1. Re: JBOSS EAP 7.0.1 and a RAR to an external Q Broker
          mnovak

          Hi Fred,

           

          the way how to install activemq rar is described in: 1.2. Install the ActiveMQ Resource Adapter

           

          Your problem is with classloading. There is not javax.jms.api module on the classpath for the war. There are following way how to solve it:

          1. Add empty messaging-activemq subsystem:

          <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">

              </subsystem>

          2. Add "Dependencies: javax.jms.api" to MANIFEST.MF to your deployment

          3. Configure javax.jms.api as global module:

            <subsystem xmlns="urn:jboss:domain:ee:4.0">

                <global-modules>

                  <module name="javax.jms.api" slot="main" />  

                 </global-modules>

          ...

           

          Cheers,

          Mirek

          • 2. Re: JBOSS EAP 7.0.1 and a RAR to an external Q Broker
            fwelland

            wow -- thanks.    I will give it a shot.   

             

            I am in a high automation environment.   So I do everything via jboss-cli.   

             

            got any hints on how to jboss-cli some of those steps?  

             

            Also -- did you start with standalone or standalone-full?     (i hazard to guess that is starting with standalone)

             

            TX....

            • 3. Re: JBOSS EAP 7.0.1 and a RAR to an external Q Broker
              mnovak

              You're welcome. Any of the steps above should solve the problem. If not then we'll dig deeper.

               

              CLI command for option 1 is:

              /subsystem=messaging-activemq:add()

               

              I guess you're running standalone.xml where is not messaging-activemq subsystem.

              • 4. Re: JBOSS EAP 7.0.1 and a RAR to an external Q Broker
                fwelland

                Oh I can run either stadalone or standalone-full under 7.0.x.   I only chose standalone as under 6.4.x that was the profile I was using.   

                 

                ....hopefully I will give this a go this afternoon.