ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » java.lang.UnsatisfiedLinkError: no mqjbnd05 in java.library.

Post new topic  Reply to topic
 java.lang.UnsatisfiedLinkError: no mqjbnd05 in java.library. « View previous topic :: View next topic » 
Author Message
pandeg
PostPosted: Thu Oct 01, 2015 1:22 pm    Post subject: java.lang.UnsatisfiedLinkError: no mqjbnd05 in java.library. Reply with quote

Disciple

Joined: 21 Oct 2014
Posts: 195

Hi , I am using JMS application to connect to remote MQ, this JMS application is deployed on Jboss server . I am getting below error message in server.log when I am trying to deploy the application on jboss server.
Code:
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/IPMKG].[action]] Servlet.service() for servlet action threw exception
java.lang.UnsatisfiedLinkError: no mqjbnd05 in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
   at java.lang.Runtime.loadLibrary0(Runtime.java:822)
   at java.lang.System.loadLibrary(System.java:992)
   at com.ibm.mq.MQSESSION.loadLib(MQSESSION.java:490)
   at com.ibm.mq.server.MQSESSION$1.run(MQSESSION.java:201)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:197)
   at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:67)
   at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:363)
   at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:150)
   at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:141)
   at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:159)
   at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
   at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:150)
   at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:682)
   at

Below is the details of jbossservice.xml file
-------------------------------------------------------

Code:
<server>
   <mbean code="com.mail.tps.PMQ.PMQConnectionFactory" name="mail.tps:service=MQQueueConnectionFactory">
      <attribute name="JndiName">PMQQueueConnectionFactory</attribute>
      <attribute name="JMSStyle">Queue</attribute>
      <attribute name="IsXA">false</attribute>
       <attribute name="QueueManagerName">QMPMP01</attribute>
       <attribute name="HostName">11.30.63.29</attribute>
                <attribute name="Port">1450</attribute>
           <attribute name="Channel">MQCONN0090</attribute>
       <attribute name="TransportType">MQJMS_TP_CLIENT_MQ_TCPIP</attribute>
      <depends>jboss:service=Naming</depends>
        </mbean>
   <mbean code="com.mail.tps.PMQ.PMQDestination" name="mail.tps:service=PMQRequestQueue">
      <attribute name="JndiName">PMQ/RequestQueue</attribute>
      <attribute name="JMSStyle">Queue</attribute>
       <attribute name="QueueManagerName">QMPMP01</attribute>
       <attribute name="DestinationName">TQ.LQH.PTM.GP.MPTP</attribute>
      <depends>jboss:service=Naming</depends>
   </mbean>
   <mbean code="com.mail.tps.PMQ.PMQDestination" name="mail.tps:service=PMQResponseQueue">
      <attribute name="JndiName">PMQ/ResponseQueue</attribute>
      <attribute name="JMSStyle">Queue</attribute>
       <attribute name="QueueManagerName">QMPMP01</attribute>
       <attribute name="DestinationName">TQ.RQH.LQH.PTM.GP.MPTP</attribute>
      <depends>jboss:service=Naming</depends>
   </mbean>
        <mbean code="com.mail.tps.PMQ.PMQDestination" name="mail.tps:service=PMQSenderQueue">
               <attribute name="JndiName">PMQ/SenderQueue</attribute>
               <attribute name="JMSStyle">Queue</attribute>
               <attribute name="QueueManagerName">QMPMP01</attribute>
               <attribute name="DestinationName">TQ.RQH.PTM.SC.SEND</attribute>
               <depends>jboss:service=Naming</depends>
       </mbean>
       <mbean code="com.mail.tps.PMQ.PMQDestination" name="mail.tps:service=PMQReceiveQueue">
                <attribute name="JndiName">PMQ/ReceiveQueue</attribute>
                <attribute name="JMSStyle">Queue</attribute>
                <attribute name="QueueManagerName">QMPMP01</attribute>
                <attribute name="DestinationName">TQ.RQH.PTM.GP.MPTP</attribute>
                 <depends>jboss:service=Naming</depends>
        </mbean>
</server>
Back to top
View user's profile Send private message
vennela
PostPosted: Thu Oct 01, 2015 2:15 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Usually you get this error when you use transport type as BINDINGS vs CLIENT

How did you create the above XML file

Your best bet is to set the below property to use CLIENT mode

<attribute name="TransportType">MQJMS_TP_CLIENT_MQ_TCPIP</attribute>
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pandeg
PostPosted: Thu Oct 01, 2015 2:48 pm    Post subject: Reply with quote

Disciple

Joined: 21 Oct 2014
Posts: 195

vennela wrote:
Usually you get this error when you use transport type as BINDINGS vs CLIENT

How did you create the above XML file

Your best bet is to set the below property to use CLIENT mode

<attribute name="TransportType">MQJMS_TP_CLIENT_MQ_TCPIP</attribute>


Thanks , but I am already using this attribute in xml file.
Back to top
View user's profile Send private message
vennela
PostPosted: Thu Oct 01, 2015 2:52 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

What other options do you have for this property?

Hence my question, how did you generate that xml file

What version of MQ?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pandeg
PostPosted: Fri Oct 02, 2015 5:45 am    Post subject: Reply with quote

Disciple

Joined: 21 Oct 2014
Posts: 195

vennela wrote:
What other options do you have for this property?

Hence my question, how did you generate that xml file

What version of MQ?


I am trying to connect to MQ version 8.0.0.3
Back to top
View user's profile Send private message
Skalli
PostPosted: Fri Oct 09, 2015 4:55 am    Post subject: Reply with quote

Newbie

Joined: 08 Jun 2015
Posts: 5

Hi,

I have a similiar question regarding the mqjbnd library.

We have one server with our QM (MQ 8.0.0.3) and one WebSphere Application Server (ND 8.5.5.6). I am new to MQ and we keep getting the "Failed to load the WebSphere MQ native JNI library: 'mqjbnd'." exception in our logs.

I have tried as suggested by an IBM document, to insert the library path into the jms connection:
WebSphere Console -> Resources -> JMS -> JMS providers -> WebSphere MQ messaging provider -> inserted the path from our MQ server here "Native library path": /opt/mqm/java/lib64.

Code:

-----------------------------------------------------------------------
| Failed to load the WebSphere MQ native JNI library: 'mqjbnd'.
|
| The JVM attempted to load the platform native library 'mqjbnd',
| which was mapped to the filename: 'libmqjbnd.so'.
|
| When attempting to load the library, the JVM reported the error
| message:
| 'mqjbnd (Not found in java.library.path)'
|
| The JVM's bit-size is: '64'
|
| The library path which was used to locate this library was:
| '*** Configured java.library.path **********************************
|  "/opt/IBM/WebSphere/AppServer/lib/native/linux/x86_64/"
|  "/opt/IBM/WebSphere/AppServer/java/jre/lib/amd64/compressedrefs"
|  "/opt/IBM/WebSphere/AppServer/java/jre/lib/amd64"
|  "/opt/IBM/WebSphere/AppServer/bin"
|  "/opt/IBM/WebSphere/AppServer/nulldllsdir"
|  "/usr/lib"
|  ""
| ********************************************************************'
|
| Check that the bit size of the JVM matches the bit size of the first
| native library file located within this java.library.path directory
| list.
|
| The native library 'mqjbnd' is used by the WebSphere MQ classes for
| Java and WebSphere MQ classes for JMS when creating a connection to
| the queue manager using a 'bindings' mode connection. A bindings
| mode connection is a connection which uses the system's memory to
| communicate with the queue manager, as opposed to a 'client' mode
| connection which uses a TCP/IP socket.
|
| In order to communicate with a queue manager using a bindings mode
| connection, [b]the queue manager must be located on the same system as
| the WebSphere MQ classes for Java/JMS[/b]. If this is not the case in
| your environment, consider reconfiguring the application to utilise
| client mode connections.


Does this mean, we should not use bindings mode and switch to client mode? Because the libmqjbnd.so is on our MQ server:

Code:

<<servername>>:/opt/mqm/java/lib64 # ls
jdbc  libmqjbnd.so  libmqjexitstub02.so
<<servername>>:/opt/mqm/java/lib64 #

So this should be correct, I guess?

I don't know if this forum has any spoiler-tag so I post the stack trace here if this helps anyone:

Code:

-----------------------------------------------------------------------
                         Class : class com.ibm.mq.jmqi.local.LocalMQ$3
                         Stack : com.ibm.mq.jmqi.local.LocalMQ.loadLib(LocalMQ.java:1178)
                               : com.ibm.mq.jmqi.local.LocalMQ.access$200(LocalMQ.java:154)
                               : com.ibm.mq.jmqi.local.LocalMQ$1.run(LocalMQ.java:290)
                               : java.security.AccessController.doPrivileged(AccessController.java:363)
                               : com.ibm.mq.jmqi.local.LocalMQ.initialise_inner(LocalMQ.java:276)
                               : com.ibm.mq.jmqi.local.LocalMQ.initialise(LocalMQ.java:238)
                               : com.ibm.mq.jmqi.local.LocalMQ.<init>(LocalMQ.java:1242)
                               : com.ibm.mq.jmqi.local.LocalServer.<init>(LocalServer.java:198)
                               : sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:-2)
                               : sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
                               : sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
                               : java.lang.reflect.Constructor.newInstance(Constructor.java:527)
                               : com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:721)
                               : com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:655)
                               : com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:580)
                               : com.ibm.msg.client.wmq.factories.WMQComponent.getImplementationInfo(WMQComponent.java:178)
                               : com.ibm.msg.client.commonservices.trace.Trace.getVersion(Trace.java:1870)
                               : com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1828)
                               : com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1720)
                               : com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1545)
                               : com.ibm.msg.client.wmq.common.internal.WMQTraceHandler.ffst(WMQTraceHandler.java:691)
                               : com.ibm.msg.client.wmq.common.internal.WMQTraceHandler.ffst(WMQTraceHandler.java:654)
                               : com.ibm.msg.client.wmq.common.internal.WMQTraceHandler.ffst(WMQTraceHandler.java:638)
                               : com.ibm.mq.jmqi.remote.impl.RemoteProxyQueue.proxyMQGET(RemoteProxyQueue.java:2474)
                               : com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternalWithRecon(RemoteFAP.java:6296)
                               : com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternal(RemoteFAP.java:6195)
                               : com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:1189)
                               : com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGet(RemoteFAP.java:6156)
                               : com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQConsumerShadow.java:1434)
                               : com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInternal(WMQSyncConsumerShadow.java:227)
                               : com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQConsumerShadow.java:1192)
                               : com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMessageConsumer.java:460)
                               : com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveInboundMessage(JmsMessageConsumerImpl.java:786)
                               : com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(JmsMessageConsumerImpl.java:486)
                               : com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:212)
                               : com.ibm.ejs.jms.JMSMessageConsumerHandle.receive(JMSMessageConsumerHandle.java:553)
                               : com.ibm.ejs.jms.JMSMessageConsumerHandle.receive(JMSMessageConsumerHandle.java:501)
                               : de.docware.apps.etk.plugins.customer.daimler.iparts.d.b$1.run(SourceFile:146)
                               : java.lang.Thread.run(Thread.java:790)
     Caused by [3] --> Message : java.lang.UnsatisfiedLinkError: mqjbnd (Not found in java.library.path)
                         Class : class java.lang.UnsatisfiedLinkError
                         Stack : java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1089)
                               : java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1053)
                               : java.lang.System.loadLibrary(System.java:510)
                               : com.ibm.mq.jmqi.local.LocalMQ.loadLib(LocalMQ.java:1140)
                               : com.ibm.mq.jmqi.local.LocalMQ.access$200(LocalMQ.java:154)
                               : com.ibm.mq.jmqi.local.LocalMQ$1.run(LocalMQ.java:290)
                               : java.security.AccessController.doPrivileged(AccessController.java:363)
                               : com.ibm.mq.jmqi.local.LocalMQ.initialise_inner(LocalMQ.java:276)
                               : com.ibm.mq.jmqi.local.LocalMQ.initialise(LocalMQ.java:238)
                               : com.ibm.mq.jmqi.local.LocalMQ.<init>(LocalMQ.java:1242)
                               : com.ibm.mq.jmqi.local.LocalServer.<init>(LocalServer.java:198)
                               : sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:-2)
                               : sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
                               : sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
                               : java.lang.reflect.Constructor.newInstance(Constructor.java:527)
                               : com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:721)
                               : com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:655)
                               : com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:580)
                               : com.ibm.msg.client.wmq.factories.WMQComponent.getImplementationInfo(WMQComponent.java:178)
                               : com.ibm.msg.client.commonservices.trace.Trace.getVersion(Trace.java:1870)
                               : com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1828)
                               : com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1720)
                               : com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1545)
                               : com.ibm.msg.client.wmq.common.internal.WMQTraceHandler.ffst(WMQTraceHandler.java:691)
                               : com.ibm.msg.client.wmq.common.internal.WMQTraceHandler.ffst(WMQTraceHandler.java:654)
                               : com.ibm.msg.client.wmq.common.internal.WMQTraceHandler.ffst(WMQTraceHandler.java:638)
                               : com.ibm.mq.jmqi.remote.impl.RemoteProxyQueue.proxyMQGET(RemoteProxyQueue.java:2474)
                               : com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternalWithRecon(RemoteFAP.java:6296)
                               : com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGetInternal(RemoteFAP.java:6195)
                               : com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:1189)
                               : com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiGet(RemoteFAP.java:6156)
                               : com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQConsumerShadow.java:1434)
                               : com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInternal(WMQSyncConsumerShadow.java:227)
                               : com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQConsumerShadow.java:1192)
                               : com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMessageConsumer.java:460)
                               : com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveInboundMessage(JmsMessageConsumerImpl.java:786)
                               : com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(JmsMessageConsumerImpl.java:486)
                               : com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:212)
                               : com.ibm.ejs.jms.JMSMessageConsumerHandle.receive(JMSMessageConsumerHandle.java:553)
                               : com.ibm.ejs.jms.JMSMessageConsumerHandle.receive(JMSMessageConsumerHandle.java:501)
                               : de.docware.apps.etk.plugins.customer.daimler.iparts.d.b$1.run(SourceFile:146)
                               : java.lang.Thread.run(Thread.java:790)


Edit: Okay, I got it. I thought that WAS would know that the library is on the MQ server, somehow. But it seems it can't know that, that's why it's not working. Finally found a document where it states to use client mode.
https://www-01.ibm.com/support/knowledgecenter/prodconn_1.0.0/com.ibm.scenarios.wmqwasusing.doc/topics/swg21498708_85.htm

Thanks anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » java.lang.UnsatisfiedLinkError: no mqjbnd05 in java.library.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.