1 2 3 Previous Next 38 Replies Latest reply on Mar 23, 2012 3:12 PM by ndipiazza Go to original post Branched to a new discussion.
      • 15. Re: jboss 7 AS Integration with WebSphere MQ
        psomogyvari

        Thanks for the idea, I'm also a beginner and I tried it out of course, but didnt success. The output was:

         

        15:51:32,637 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "com.ibm.mqetclient.jar"

        15:51:32,653 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "wmq.jmsra.rar"

        15:51:32,653 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "testharness.mdb.jar"

        15:51:33,778 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry connector.jar in "/D:/pa/jboss-as-7.1.0.CR1

        b/bin/content/wmq.jmsra.rar/com.ibm.mq.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,778 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry jta.jar in "/D:/pa/jboss-as-7.1.0.CR1b/bin/

        content/wmq.jmsra.rar/com.ibm.mq.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,778 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry jms.jar in "/D:/pa/jboss-as-7.1.0.CR1b/bin/

        content/wmq.jmsra.rar/com.ibm.mqjms.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,794 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry rmm.jar in "/D:/pa/jboss-as-7.1.0.CR1b/bin/

        content/wmq.jmsra.rar/com.ibm.mqjms.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,794 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry jndi.jar in "/D:/pa/jboss-as-7.1.0.CR1b/bin

        /content/wmq.jmsra.rar/com.ibm.mqjms.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,794 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry ldap.jar in "/D:/pa/jboss-as-7.1.0.CR1b/bin

        /content/wmq.jmsra.rar/com.ibm.mqjms.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,794 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry fscontext.jar in "/D:/pa/jboss-as-7.1.0.CR1

        b/bin/content/wmq.jmsra.rar/com.ibm.mqjms.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,794 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry providerutil.jar in "/D:/pa/jboss-as-7.1.0.

        CR1b/bin/content/wmq.jmsra.rar/com.ibm.mqjms.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,794 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry CL3Export.jar in "/D:/pa/jboss-as-7.1.0.CR1

        b/bin/content/wmq.jmsra.rar/com.ibm.mqjms.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:33,794 WARN  [org.jboss.as.deployment] (MSC service thread 1-2) Class Path entry CL3Nonexport.jar in "/D:/pa/jboss-as-7.1.0.

        CR1b/bin/content/wmq.jmsra.rar/com.ibm.mqjms.jar"  does not point to a valid jar for a Class-Path reference.

        15:51:34,013 INFO  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-1) IJ020001: Required license terms for fil

        e:/D:/pa/jboss-as-7.1.0.CR1b/standalone/tmp/vfs/tempb9dcd80d8e5a2111/wmq.jmsra.rar-234a510f9d1f5b56/contents/

        15:51:34,216 INFO  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-1) IJ020001: Required license terms for

        file:/D:/pa/jboss-as-7.1.0.CR1b/standalone/tmp/vfs/tempb9dcd80d8e5a2111/wmq.jmsra.rar-234a510f9d1f5b56/contents/

        15:51:34,325 ERROR [stderr] (MSC service thread 1-1) ERROR: com.ibm.mq.jms.MQConnectionFactory - Class.forName(classname, true, cl

        assloader) couldn't load ConfigEnvironment class. Exception: java.lang.ClassNotFoundException: com.ibm.mq.jms.services.ConfigEnvir

        onment from [Module "org.jboss.as.connector:main" from local module loader @1394894 (roots: D:\pa\jboss-as-7.1.0.CR1b\modules)]

        15:51:34,388 WARN  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-1) IJ020009: Invalid connection definiti

        on with class-name: com.ibm.mq.jms.MQConnectionFactory

        15:51:34,388 WARN  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-1) IJ020009: Invalid connection definiti

        on with class-name: com.ibm.mq.jms.MQConnectionFactory

        15:51:34,388 WARN  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-1) IJ020009: Invalid connection definiti

        on with class-name: com.ibm.mq.jms.MQConnectionFactory

        15:51:34,403 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-1) JBAS010405: Registered admin object at java:jboss/

        TEST.PETER2

        15:51:34,403 ERROR [stderr] (MSC service thread 1-1) WMQ Resource Adapter warning: MQJCA4005:Distributed transactions are not avai

        lable in client mode.

        15:51:34,419 ERROR [stderr] (MSC service thread 1-1) WMQ Resource Adapter warning: implementation version not set, version check s

        kipped

        15:51:34,419 INFO  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-1) IJ020002: Deployed: file:/D:/pa/jboss

        -as-7.1.0.CR1b/standalone/tmp/vfs/tempb9dcd80d8e5a2111/wmq.jmsra.rar-234a510f9d1f5b56/contents/

        15:51:34,419 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-3) JBAS010401: Bound JCA AdminObject [java:jboss/TEST

        .PETER2]

        15:51:35,372 ERROR [stderr] (MSC service thread 1-4) ERROR: couldn't load ConfigEnvironment class. Exception: java.lang.ClassNotFo

        undException: com.ibm.mq.jms.services.ConfigEnvironment from [Module "org.jboss.as.ee:main" from local module loader @1394894 (roo

        ts: D:\pa\jboss-as-7.1.0.CR1b\modules)]

        15:51:35,904 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."

        testharness.mdb.jar".component.WMQMDBTest.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."testharnes

        s.mdb.jar".component.WMQMDBTest.START: 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_25]

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

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

        Caused by: java.lang.RuntimeException: javax.resource.ResourceException: MQJCA0003:A JNDI naming exception was thrown. See the lin

        ked exception for details.

                at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:152)

                at org.jboss.as.ee.component.ComponentStartService.start(ComponentStartService.java:44)

                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.ResourceException: MQJCA0003:A JNDI naming exception was thrown. See the linked exception for details.

                at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:103)

                at com.ibm.mq.connector.DestinationBuilder.createDestination(DestinationBuilder.java:106)

                at com.ibm.mq.connector.inbound.MessageEndpointDeployment.start(MessageEndpointDeployment.java:219)

                at com.ibm.mq.connector.inbound.MessageEndpointDeployment.<init>(MessageEndpointDeployment.java:191)

                at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:380)

                at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:150)

                ... 6 more

        Caused by: javax.naming.NameNotFoundException: TEST.PETER2 -- service jboss.naming.context.java."TEST.PETER2"

                at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:92)

                at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177)

                at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:87)

                at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213)

                at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_25]

                at com.ibm.mq.connector.DestinationBuilder.createDestination(DestinationBuilder.java:94)

                ... 10 more

         

         

        15:51:35,951 ERROR [org.jboss.as] (MSC service thread 1-4) JBoss AS 7.1.0.CR1b "Flux Capacitor" started (with errors) in 17866ms -

        Started 207 of 284 services (1 services failed or missing dependencies, 74 services are passive or on-demand)

        15:51:35,951 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015857: Undeploy of deployment "wmq.jmsra.rar" was ro

        lled back with no failure message

        15:51:35,966 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-1) JBAS010410: Unbound JCA AdminObject [java:jboss/TE

        ST.PETER2]

        15:51:35,966 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015856: Undeploy of deployment "testharness.mdb.jar"

        was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"testharness.mdb.jar\".component.W

        MQMDBTest.START" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"testharness.mdb.jar\".component.WMQMD

        BTest.START: Failed to start service"}}

        15:51:35,966 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015857: Undeploy of deployment "com.ibm.mqetclient.ja

        r" was rolled back with no failure message

        15:51:35,998 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment testharness.mdb.jar in 30ms

        15:51:35,998 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment com.ibm.mqetclient.jar in 27ms

        15:51:36,013 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment wmq.jmsra.rar in 51ms

        15:51:36,013 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

        JBAS014777:   Services which failed to start:      service jboss.deployment.unit."testharness.mdb.jar".component.WMQMDBTest.START:

        org.jboss.msc.service.StartException in service jboss.deployment.unit."testharness.mdb.jar".component.WMQMDBTest.START: Failed to

        start service

         

         

        15:51:36,013 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS014654: Composite operation was ro

        lled back

        15:51:36,013 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation fail

        ed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"

        testharness.mdb.jar\".component.WMQMDBTest.START" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test

        harness.mdb.jar\".component.WMQMDBTest.START: Failed to start service"}}}}

        15:51:36,029 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS014654: Composite operation was ro

        lled back

        • 16. Re: jboss 7 AS Integration with WebSphere MQ
          jesper.pedersen

          Your configuration doesn't look correct.

           

          You can use the RAR info tool - http://docs.jboss.org/ironjacamar/userguide/1.1/en-US/html/tools.html#tools_rarinfo - from the IronJacamar 1.1.0.Alpha4 distribution to get a sample deployment descriptor.

          • 17. Re: jboss 7 AS Integration with WebSphere MQ

            I'm having the a similiar issue which I posted earlier in the week but haven't received any input as of yet:

            https://community.jboss.org/message/647842

             

            I did notice when I used wmq.jmsra.rar version 6.0.2.8, I received the same error as psomogyvari  did above.  When I use version 7.0.1.6, I do not get this error, but I still can not figure out how to bind to the connection factory using simply @ResourceAdapter("wmq.jmsra.rar") .  I've tried many different combinations of activationConfigProperties in my MDB, but no such luck.  I assumed if I reference the admin object defined in my RA by the destination in my activationConfigProperty,  I would get a reference to my connection factory, but that is not the case.

            e.g.:

            @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:jboss/OMMITTED"),

            @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true")

             

            As I stated in my other post, I can get this MDB to connect to the remote host if I specify all of the MQ properties  as activationconfigproperties in the MDB (host, channel, etc), however I would prefer not to do it this way.

             

             

            • 18. Re: jboss 7 AS Integration with WebSphere MQ
              stighenriksen

              I have the exact same problem as Paul Dubon. Does anyone here know if it's actually possible to do this though? Specifically, is it possible in JBoss AS7 to configure an EJB3 MDB with

              @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:jboss/OMMITTED"),

              @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true")

               

              where the destination refers to a queue defined as an admin-object in the resource-adapters subsystem section in the JBoss' XML config? Or does one have to use something like a resource-ref-element in ejb-jar.xml and make that link to ejb-jboss3.xml which finally looks up the admin object?

              • 19. Re: jboss 7 AS Integration with WebSphere MQ
                psomogyvari

                Thanks, that sounds a really nice to have and useful tool!

                I tried it out and it was not able to generate the example descriptor though. The tool responded like this:

                 

                rar-info.bat wmq.jmsra.rar

                 

                java -classpath ironjacamar-as.jar;..\..\lib\ironjacamar-common-spi.jar;..\..\lib\jboss-logging.jar;..\..\lib\jboss-common-core.jar;..\..\lib\ironjacamar-spec-api.jar;..\..\lib\papaki-core.jar;..\..\lib\javassist.jar;..\..\lib\ironjacamar-common-impl.jar;..\..\lib\ironjacamar-common-impl-papaki.jar;..\..\lib\ironjacamar-common-api.jar;..\..\lib\ironjacamar-validator.jar org.jboss.jca.as.rarinfo.Main wmq.jmsra.rar

                 

                Error: javax/jms/JMSException

                java.lang.NoClassDefFoundError: javax/jms/JMSException

                        at java.lang.Class.forName0(Native Method)

                        at java.lang.Class.forName(Unknown Source)

                        at org.jboss.jca.validator.Validation.createResourceAdapter(Validation.java:260)

                        at org.jboss.jca.validator.Validation.validate(Validation.java:156)

                        at org.jboss.jca.as.rarinfo.Main.main(Main.java:247)

                Caused by: java.lang.ClassNotFoundException: javax.jms.JMSException

                        at java.net.URLClassLoader$1.run(Unknown Source)

                        at java.security.AccessController.doPrivileged(Native Method)

                        at java.net.URLClassLoader.findClass(Unknown Source)

                        at java.lang.ClassLoader.loadClass(Unknown Source)

                        at java.lang.ClassLoader.loadClass(Unknown Source)

                        ... 5 more

                 

                I tried to resolve this issue by checking the steps provided here: https://www-304.ibm.com/support/docview.wss?uid=swg21255573 which lead to some conclusions:

                Step 1 is okay, of course.

                However the other steps are not exactly clear since I read in some IBM documentation that the only way to modify the default propertys of the Jboss/WMQ connection is to modify the ra.xml in the wmq.jmsra file due to some limitations from the Jboss side of the relationship.

                 

                Based on this, I tried to locate the mentioned properties in the ra.xml but did not succeed so far. (properties like jms.MessageBrokerName, jms.Password, jms.UserName)

                 

                What I'm sure is that the remote queueManager I'm trying to access does not listen on the default port (1414) but on some other arbitrary.

                 

                Could you please help me in resolving this issue with rar-info?

                • 20. Re: jboss 7 AS Integration with WebSphere MQ
                  stighenriksen

                  Try adding the jboss-jms-api jar to the classpath by modifying rar-info.bat so that it looks like this (insert your jboss install folder path):

                   

                  java -classpath ironjacamar-as.jar;..\..\lib\ironjacamar-common-spi.jar;..\..\lib\jboss-logging.jar;..\..\lib\jboss-common-core.jar;..\..\lib\ironjacamar-spec-api.jar;..\..\lib\papaki-core.jar;..\..\lib\javassist.jar;..\..\lib\ironjacamar-common-impl.jar;..\..\lib\ironjacamar-common-impl-papaki.jar;..\..\lib\ironjacamar-common-api.jar;..\..\lib\ironjacamar-validator.jar;PATH_TO_YOUR_JBOSS_INSTALL_FOLDER/modules/javax/jms/api/main/jboss-jms-api_1.1_spec-1.0.0.Final.jar org.jboss.jca.as.rarinfo.Main wmq.jmsra.rar %*

                  • 21. Re: jboss 7 AS Integration with WebSphere MQ
                    psomogyvari

                    Thanks for your suggestion, now it behaves like:

                     

                    c:\peter\pa\ironjacamar-1.1.0.Alpha4\doc\as>rar-info.bat wmq.jmsra.rar

                    c:\peter\pa\ironjacamar-1.1.0.Alpha4\doc\as>java -classpath ironjacamar-as.jar;..\..\lib\ironjacamar-common-spi.jar;..\..\lib\jboss-logging.jar;..\..\lib\jboss-common-core.jar;..\..\lib\ironjacamar-spec-api.jar;..\..\lib\papaki-core.jar;..\..\lib\javassist.jar;..\..\lib\ironjacamar-common-impl.jar;..\..\lib\ironjacamar-common-impl-papaki.jar;..\..\lib\ironjacamar-common-api.jar;..\..\lib\ironjacamar-validator.jar; c:\peter\pa\jboss-as-7.1.0.CR1b\modules\javax\jms\api\main\jboss-jms-api_1.1_spec-1.0.0.Final.jar org.jboss.jca.as.rarinfo.Main wmq.jmsra.rar

                     

                    Exception in thread "main" java.lang.NoClassDefFoundError: c:\peter\pa\jboss-as-7/1/0/CR1b\modules\javax\jms\api\main\jboss-jms-api_1/1_spec-1/0/0/Final/jar

                    Caused by: java.lang.ClassNotFoundException: c:\peter\pa\jboss-as-7.1.0.CR1b\modules\javax\jms\api\main\jboss-jms-api_1.1_spec-1.0.0.Final.jar

                            at java.net.URLClassLoader$1.run(Unknown Source)

                            at java.security.AccessController.doPrivileged(Native Method)

                            at java.net.URLClassLoader.findClass(Unknown Source)

                            at java.lang.ClassLoader.loadClass(Unknown Source)

                            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

                            at java.lang.ClassLoader.loadClass(Unknown Source)

                    Could not find the main class: c:\peter\pa\jboss-as-7.1.0.CR1b\modules\javax\jms\api\main\jboss-jms-api_1.1_spec-1.0.0.Final.jar.  Program will exit.

                    • 22. Re: jboss 7 AS Integration with WebSphere MQ
                      jesper.pedersen

                      "rar-info.bat -classpath <path/to/jmsapi.jar> wmq.rar" should work

                      • 23. Re: jboss 7 AS Integration with WebSphere MQ
                        psomogyvari

                        That did the trick, and finally I was able to got it working thank you Jesper Pedersen and all the others too!

                         

                        For those who need the information: what I had to do after the config generation with rar-info was:

                         

                        1) based on this link I changed useJNDI to false:

                        http://stackoverflow.com/questions/6288529/how-to-map-a-websphere-mq-7-queue-to-a-ejb-3-destinationname

                         

                        2)define the queue as an admin object in wmq.jmsra.-ds.xml like this:

                         

                        <mbean code="org.jboss.resource.deployment.AdminObject"

                              name="jca.wmq:name=TEST.PETER2">   

                            <attribute name="JNDIName">TEST.PETER2</attribute>

                            <depends optional-attribute-name="RARName">

                              jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'

                            </depends>

                            <attribute name="Type">javax.jms.Queue</attribute>

                              <attribute name="Properties">

                              baseQueueManagerName={omitted for security reasons}

                              baseQueueName=TEST.PETER2

                            </attribute>

                          </mbean>

                         

                        Now if I put a message to TEST.PETER2 the MDB-s onMessage gets called and everything works.

                        • 24. Re: jboss 7 AS Integration with WebSphere MQ

                          So, I guess that means you are utilzing a '*-ds.xml' file with AS 7.  I'm new to JBoss, but I didn't think those -ds.xml files were relevant in AS7

                          • 25. Re: jboss 7 AS Integration with WebSphere MQ
                            stighenriksen

                            Where did you put the wmq.jmsra.-ds.xml file,  psomogyvari?

                            • 26. Re: jboss 7 AS Integration with WebSphere MQ
                              psomogyvari

                              Me neither, I read somewhere on the internet that -ds.xml is kinda depracted, as a lot of other configuration xml files since AS7.

                              • 27. Re: jboss 7 AS Integration with WebSphere MQ
                                psomogyvari

                                Directly next to the wmq.jmsra.rar file, inside the deployments folder of Jboss.

                                • 28. Re: jboss 7 AS Integration with WebSphere MQ
                                  jesper.pedersen

                                  You are not making any sense - you can't use a -ds.xml to configure a resource adapter on AS7 - you use the subsystem:resource-adapters - and the org.jboss.resource classes aren't included.

                                   

                                  Sounds like you are using AS3/4/5/6 or JBoss EAP - in which case you are in the wrong forum.

                                  • 29. Re: jboss 7 AS Integration with WebSphere MQ

                                    Jesper, are you able to provide any insight to this?  I posted another thread last week https://community.jboss.org/message/647842  which hasn't been answered (or even replied to). Stig is also looking for the same answer, so it seems this is a common issue.  We're not sure if there's an actual bug or we're not configured properly, but some insight would be appreciated.   I am trying to migrate from Websphere to JBoss AS 7 and am growing concerned that it is not ready and I should possibly be considering another version.