Hello. I am using IBM WebSphere Mqseries and the MQ base-classes in windows2000. That means I am not using JMS-classes for MQ. I am just using MQ on my own machine so my query-manager is "QM_oemcomputer". My queue is "SYSTEM.DEFAULT.LOCAL.QUEUE". My application (JSP/servlets/javabeans) worked ok some weeks, but one day I discovered 2 problems: problem 1: This regard just VAJ (VisualAge for Java). The error is: java.lang.UnsatisfiedLinkError no mqjbnd02 in java.library.path I get the error in the following statement:qMgr = new MQQueueManager("QM_oemcomputer"); I have checked that the folder for mqjbnd02.dll is in the CLASSPATH environmentvariabel. I am testing with WebSphere Test Environment in VAJ and I have also put this folder (with mqjbnd02.dll) in the Class Path for WTE. I have imported the neccessary MQ-classes into VAJ and is therefore not running with jar-files. When I try the function (from my browser as a client) for the second time I dont get the same error, but I get: java.lang.NoClassDefFoundError on class: MQSESSION This also happens the third time, the fourth time .....aso I feel that everything is like it was when it was working ok, but I guess I have done something in between that has caused the problem. problem 2: This regards just WAS (WebSphere Application Server). The first time I start up my application it works ok. I then stop the application in the WebSphere Advanced Administrative Console and then start the application again. The application starts up ok, but when I try to run it on a browser as a client I get the error: java.lang.UnsatisfiedLinkError ..... Native Library C:\Programfiler\IBM\MQSeries Integrator 2.0\bin\mqjbnd02.dll already loaded in another classloader I have to boot the machine again to make my MQ-application work again.
I wonder if these two problems is caused by the same problem. I guess I somehow have messed up my classloaders. I have found several similar problems in discussions forums on Internett, but I have not found good answers. Can anyone in JavaRanch help me ?
Hi Erik, The java.lang.UnsatisfiedLinkError is encountered when the environment variable java.library.path is not set. Depending on which version of WAS you are using, you must set LIB_PATH (WAS 3.x) in environment variable or java.library.path (WAS 4.x) in the system properties of the JVM. This variable must point to the directory where your dll is located. You can also set the java.library.path in VAJ with -D parameter of the JVM. Eric.
Joined: Feb 26, 2002
At last I have solved these two problems. Problem 1 in VAJ (4.0): I made the statement: System.out.println("java.library.path: " + System.getProperty("java.library.path")); Then I knew what library-path I actually was using. I then solved the problem by copying the actual file to one of these existing directories in the library-path. Problem 2 in WAS (4.0): I was using the "MODULE" option of the "Module visibility". I changed this to "APPLICATION" option. Then it worked ok when I stopped and restarted my application. The "Module visibility" is set in the WebSphere Advanced Administrative Console in the folder: Nodes oemcomputer (in my case) Application Server Default Server (in my case)
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com