2 Replies Latest reply on Oct 5, 2005 10:32 AM by iand

    JBoss communication problem with Websphere MQ

    iand

      Hello,

      I have a problem getting JBoss to work with Websphere MQ (MQSeries) 5.3 on SuSE 9.2. The problem originally arose with JBoss 4.0.2 but also happens with JBoss 3.2.3.

      JBoss runs in the background as its own user 'jboss'. I use the jboss_init_suse.sh script to start and the jboss user has LIBPATH=LD_LIBRARY_PATH=/opt/mqm/java/lib.

      When JBoss starts up we get the following warning:

      ------------
      18:32:34,648 WARN [ServiceController] Problem starting service
      jboss.mq:service=JMSProviderLoader,name=MQSeriesProvider
      java.lang.ClassNotFoundException: No ClassLoaders found for:
      org.jboss.jms.jndi.MQSeriesProvider
      at
      org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:241)
      at..... etc etc
      ------------

      yet this class is definitely in server/default/lib/jboss.jar so I
      can't understand why JBoss does not find it.

      Finally at startup, we get an error message that our bean could not be deployed completely because "MQSeriesProvider not bound" :

      ------------
      18:33:00,679 INFO [EARDeployer] Started J2EE application:
      file:/opt/jboss-3.2.3/server/default/deploy/tarp2ee-app.ear
      18:33:00,679 INFO [MainDeployer] Deployed package:
      file:/opt/jboss-3.2.3/server/default/deploy/tarp2ee-app.ear
      18:33:00,681 ERROR [URLDeploymentScanner] MBeanException: Exception in
      MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.mq:servic e=JMSProviderLoader,name=MQSeriesProvider
      state: FAILED
      I Depend On:
      Depends On Me: java.lang.ClassNotFoundException: No ClassLoaders
      found for: org.jboss.jms.jndi.MQSeriesProvider, ObjectName:
      jboss.j2ee:jndiName=local/tarp/InputQueueReaderBean,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: javax.naming.NameNotFoundException: MQSeriesProvider
      not bound]
      18:33:00,689 INFO [URLDeploymentScanner] Started
      jboss.deployment:type=DeploymentScanner,flavor=URL
      18:33:00,917 INFO [MainDeployer] Deployed package:
      file:/opt/jboss-3.2.3/server/default/conf/jboss-service.xml
      18:33:00,928 INFO [Server] JBoss (MX MicroKernel) [3.2.3 (build:
      CVSTag=JBoss_3_2_3 date=200401211844)] Started in 1m:4s:88ms
      ------------

      I have made sure that the MQ java libraries are in the java.library.path. Is there something that I have neglected to configure in JBoss?

      Many thanks for any suggestions.
      Ian

        • 1. Re: JBoss communication problem with Websphere MQ
          iand

          Hello,

          well I've gotten a little further with this. Turns out that I *was* actually missing the class org.jboss.jms.jndi.MQSeriesProvider, because this doesn't come with jboss.jar out of the box - it's a custom class. There was also a problem setting up the JMS queue bindings but that was sorted too. Lastly, I needed to add the JMS provider loader to server/default/deploy/jms/jms-ds.xml and the adapter to server/default/conf/standardjboss.xml. I'm nearly there, this is what I get just after startup in server.log:

          2005-09-30 18:19:32,189 Reconnected to JMS provider
          2005-09-30 18:19:32,189 JMS provider failure detected:
          javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for ''
          at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:569)
          at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2321)
          at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1749)
          at com.ibm.mq.jms.MQQueueConnection.(MQQueueConnection.java:144)
          at com.ibm.mq.jms.MQQueueConnection.(MQQueueConnection.java:54)
          at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:106)
          at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:155)
          at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:458)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:674)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1173)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:686)
          2005-09-30 18:19:32,191 Trying to reconnect to JMS provider
          2005-09-30 18:19:42,199 Initialization failed
          javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for ''
          at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:569)
          at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2321)
          at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1749)
          at com.ibm.mq.jms.MQQueueConnection.(MQQueueConnection.java:144)
          at com.ibm.mq.jms.MQQueueConnection.(MQQueueConnection.java:54)
          at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:106)
          at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:155)
          at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:458)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:674)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1173)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:686)
          .................... etc ................
          .................... etc ................
          .................... etc ................

          The interesting thing is that the queue manager is blank in the exception - it should at least be failed to create MQQueueManager for 'some_queue_manager'. MQ is fine and the jboss user can talk to it fine...

          Thanks for any ideas
          Ian

          • 2. Re: JBoss communication problem with Websphere MQ
            iand

            Ok, JBoss starts without the [failed to create MQQueueManager for ''] exception if I set

            export LD_ASSUME_KERNEL=2.4.19

            in the jboss user's environment. I realised this when I tried starting JBoss as the mqm user and it worked. I did already have the variable set in the mqm user's environment, and set when installing the RPMs as root, as is required if the kernel is newer. I didn't set it anywhere else because I couldn't see why it would be needed for anything else except Websphere MQ. For example, why change the kernel threading model for everything else aswell?

            I guessed that as a compromise I could set it in the script that starts JBoss rather than set it as an environment variable, but after doing some more digging it appears that, as long as you have MQ fix pack 5 or later, using

            export AMQ_THREADMODEL_RESET=1

            for the jboss user will be enough as this sets LD_ASSUME_KERNEL=2.4.19 but has the advantage that the LD_ASSUME_KERNEL variable is only defined for MQ processes and so other applications are unaffected and can run with the new posix thread model.

            Other things that I already had done but need to be noted are:

            - make the jboss user a member of the mqm group
            - set access permissions for jboss user for queue manager and queue(s)
            - set LD_LIBRARY_PATH=LIBPATH=/opt/mqm/java/lib.
            - make symlinks for /opt/mqm/java/lib*.jar in server/default/deploy/lib
            - add MQ Series as JMS provider in server/default/deploy/jms/jms-ds.xml and server/default/conf/standardjboss.xml

            Hope that helps someone
            Cheers