Connecting Web client to the Workflow server (classloader error)
 Technote (troubleshooting)
 
Problem(Abstract)
A 'Native library /usr/lib/libfmcojprf.a already loaded in another classloader' error can occur using Web Clients in WebSphere® MQ Workflow.
 
Cause
WebSphere® Application Servers 'Application Classloader Policy' is set to 'multiple' in an environment where Web Clients and WebSphere MQ Workflow are used.
 
Resolving the problem
The following are the details of the environment:
  1. This is a 2-tier setup for Workflow v3.4.
  2. The Workflow server machine running AIX® 5.1 installed Workflow server V3.4, DB2® UDB V7.2 fix pack 7 and MQSeries® V5.3.0.1
  3. The Workflow WebClient machine running AIX 5.1 installed Workflow client component, such as Java™ Agent, Web Client and Administration Utility, WebSphere Application Server V5.0, and MQSeries® server V5.3.0.1.
  4. A default Workflow system (FMC) is configured in the Workflow server machine, and a WebClient (WEB) is configured in the Workflow client machine as the default configuration. Both of them have their own queue managers in the same cluster.
  5. The connection from the client to server machine has been verified by running,
    'fmcautil -u ADMIN -p password'
    from the client machine, and it was successful.

How the error presents itself?
The Web Client is restarted through WebSphere Application Server administrative console. Then the Workflow Client Logon Web page is launched, and after typing in logon ID and password, the following error was returned in SystemOut.log in Application Server:

2003-04-08 12:03:17.928 Servlet.Engine.Transports : 0: doGet (logon): com.ibm.workflow.servlet.client.ClientException
java.lang.UnsatisfiedLinkError: Native Library /usr/lib/libfmcojprf.a already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadLibrary(ClassLoader.java(Compiled Code))
at java.lang.Runtime.loadLibrary0(Runtime.java:780)
at java.lang.System.loadLibrary(System.java:865)

How to resolve the problem?
This error was due to the Application Server's 'Application Classloader Policy' was set to 'multiple'. After the Web Client is restarted and has accessed its native library, WebSphere Application Server tries to reload the native library, which already in the Application Server JVM™. For security reasons, the native library is not allowed to be reloaded in JVM.

There are two solutions:
  1. Change the Application Server's 'Application Classloader Policy' to 'single', which allows the Web Client's native library to be loaded only once even the Web Client is restarted.
  2. Make the Web Client's jars/classes available at the Application Server level, that is, set the classpath for the Application Server to point to the Web Client's classes/jars. But these classes/jars should be available in a directory NOT under <was>/InstalledApps. Refer to Web link for detailed information: http://www.ibm.com/support/docview.wss?rs=795&context=SW920&uid=swg21107686
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Business Integration WebSphere MQ Workflow Not Applicable AIX, Windows 2000 3.4
Application Servers Runtimes for Java Technology Java SDK
 
Historical Number
30
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java Message Service (JMS)
Operating system(s): Windows
Software version: 5.0
Software edition:
Reference #: 1138236
IBM Group: Software Group
Modified date: Sep 16, 2005