aspose file tools*
The moose likes Websphere and the fly likes WebSphere class loading issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "WebSphere class loading issue" Watch "WebSphere class loading issue" New topic
Author

WebSphere class loading issue

joseph xavier
Greenhorn

Joined: Feb 01, 2001
Posts: 13
I am migrating from WAS 4 to WAS6. I am using RSA 7.0.2 to do the migration of my code. JDK version used earlier was 1.3.18 and the current version set in my RSA is 1.4.2. I use older versions of xalan and xerces in my application. I am getting this error message.



I modified the server class loading settings to load PARENT_LAST and SINGLE loader. However, this affects the admin console as it to seems to be using another versions of the parsers. I get the following error


Has anybody faced this issue? Any help will be highly appreciated.
Brian Stelzer
Greenhorn

Joined: Oct 31, 2002
Posts: 29
You were close with your solution. Instead of modifying the server class loading policy you will want to modify the application's class loading policy.

Enterprise Applications>YOUR_APP->Class loader->Class loader order->Classes loaded with application class loader first.

The above will result in your application libraries getting loaded prior to the servers library( specifically xerces... )

We set up the following IBM website to help with your migration: http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg27008724

I would take a look at the .pdf on the first page. The .pdf contains all known issues( including this issue ).

Hope that helps...
Brian Stelzer
Greenhorn

Joined: Oct 31, 2002
Posts: 29
Just for reference, it is the JDK that is shipping the offending libraries and not the server.
joseph xavier
Greenhorn

Joined: Feb 01, 2001
Posts: 13
Thanks a lot! The issue was resolved by modifying the application class loading set up.
Roger Altena
Greenhorn

Joined: Apr 30, 2008
Posts: 1
I was also getting a similar error when using server classloader policy set to single and installing an ear containing a jar file with a version that differed to that used by WebSphere's admin console:

[1/05/08 12:32:58:789 EST] 0000000a ServletWrappe E SRVE0100E: Did not
realize init() exception thrown by servlet action:
java.lang.NoSuchMethodError: org.apache.commons.validator.ValidatorResources:
method addConstantParam(Ljava/lang/String;Ljava/lang/String V not found

This stopped the admin console from running, causing much wailing and gnashing of teeth. We solved the problem by deleting the offending ear from the deployed apps directory (and possibly cache/temp dirs) and restarting the server. It complained about the missing ear but at least we could get the admin console back and uninstall the app (or change the classloader policy back).
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Changing j2EE and WebSphere classloaders is not something to take lightly.

Sometimes a change can get things to work now, but has unpredictable results later on.

Here's a quick link on understanding J2EE classloaders in WebShphere for some more information:

J2EE Classloaders Demystified

-Cameron McKenzie
[ September 10, 2008: Message edited by: Cameron Wallace McKenzie ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebSphere class loading issue