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
marinmqseries
PostPosted: Fri Nov 02, 2007 3:31 am    Post subject: java.lang.UnsatisfiedLinkError: no mqjbnd05 in java.library. Reply with quote

Newbie

Joined: 21 Oct 2007
Posts: 8
Location: na

Hi I am using Mq Series on solaris.

While running the java program I am getting this exception

Exception in thread "main" 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:872)
at com.ibm.mq.server.MQSESSION$1.run(MQSESSION.java:228)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:222)
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:70)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:492)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:168)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:179)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:215)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:84)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:168)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:772)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:697)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:657)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:153)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:451)
at SendMQ.main(SendMQ.java:8

[/code]

I Guess that mqbnd05.dll is required to be set in the classpath.
But I can not found that dll in any of the folders.In windows it is located at
C:/ibm/webspehremq/java/lib.

Will mqbnd05.dll have any other equivalent jar file in solaris.

Thanks in Advance
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
bower5932
PostPosted: Fri Nov 02, 2007 3:46 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

It is a shared object that you need to add to your libpath. There are details in the Using Java manual. It has been a while, but I believe it is called libmqjbnd05.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
mvic
PostPosted: Fri Nov 02, 2007 4:10 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

bower5932 wrote:
It is a shared object that you need to add to your libpath. There are details in the Using Java manual. It has been a while, but I believe it is called libmqjbnd05.

I imagined (note the past tense) this could be fixed using LD_LIBRARY_PATH: eg.
Code:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mqm/java/lib
export LD_LIBRARY_PATH

but a search of the MQ manuals reveals nothing relevant. Also no hits for libmqjbnd05 or libmqjbnd05.so. Anyone know if this works without setting LD_LIBRARY_PATH or copying that file about the place ? I am not known for having great Java expertise but this looks like a plain runtime-linker-not-finding-its-library problem.

(By the way I don't think it would be recommended by IBM Support to copy MQ files out of the install directories - all too easy to get old versions of files in use that are not then patched when installing a fix pack).
Back to top
View user's profile Send private message
marinmqseries
PostPosted: Fri Nov 02, 2007 4:19 am    Post subject: Reply with quote

Newbie

Joined: 21 Oct 2007
Posts: 8
Location: na

I could not find ibmqjbnd05 in any of the installation directories.

Please help.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
bower5932
PostPosted: Fri Nov 02, 2007 4:21 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Well, I said that it has been a while. If you don't have a similar library on your system, then my guess is that you are running with old jar files. Where did you get them? What version of the WMQ code are you running?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
jefflowrey
PostPosted: Fri Nov 02, 2007 4:26 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's throwing this error because your application is trying to create a Bindings connection and you only have the Client installed ,or only the jars from the client install.

So either install the full Server package and create a local qmgr, or recode/configure your application to make a Client connection.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marinmqseries
PostPosted: Fri Nov 02, 2007 4:40 am    Post subject: Reply with quote

Newbie

Joined: 21 Oct 2007
Posts: 8
Location: na

I am Using WebSphere mq v 6.0 for solaris sparc platform.

I have installed full server package.

I could see that instead of mqjbnd05.dll I have libmqjbnd05.so:

When I include that in my classpath,,my java program fails with the following exception.

error: error reading /opt/mqm/java/lib/libmqjbnd05.so; error in opening zip file
Please suggest
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
bower5932
PostPosted: Fri Nov 02, 2007 5:08 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

libmqjbnd05.so doesn't belong in the classpath. It belongs in a library path. I'm not sure what the name is on Solaris.

This is old but is still probably right:

http://www.mqseries.net/phpBB2/viewtopic.php?p=61394&sid=ba1202f45be8fff2fb671ff79f3c1e23
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
marinmqseries
PostPosted: Fri Nov 02, 2007 6:38 am    Post subject: Reply with quote

Newbie

Joined: 21 Oct 2007
Posts: 8
Location: na

I have added
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mqm/java/lib
export LD_LIBRARY_PATH


And it is working.Thanks all for your support
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
mvic
PostPosted: Fri Nov 02, 2007 6:45 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

marinmqseries wrote:
I have added
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mqm/java/lib
export LD_LIBRARY_PATH


And it is working.Thanks all for your support

The official guide on what environment variables to use are at this page: http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzaw.doc/uj10330_.htm But it doesn't mention LD_LIBRARY_PATH. My advice is to follow the official documentation rather than these commands I suggested. Could you please confirm that you set all the variables suggested at that page? It may (???) render the LD_LIBRARY_PATH workaround unnecessary.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Nov 02, 2007 7:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

mvic wrote:
My advice is to follow the official documentation rather than these commands I suggested.


I agree 100%. If you ever call support with a problem, the first thing that you'll be asked to do is follow the official documentation.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fjb_saper
PostPosted: Fri Nov 02, 2007 3:00 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

marinmqseries wrote:
I have added
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mqm/java/lib
export LD_LIBRARY_PATH


And it is working.Thanks all for your support


Note that with V6 you may have to set both LD_LIBRARY_PATH & LD_LIBRARY_PATH64

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
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.