File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes ClassNotFoundException on WAS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "ClassNotFoundException on WAS" Watch "ClassNotFoundException on WAS" New topic

ClassNotFoundException on WAS

robert robichet

Joined: Jun 27, 2005
Posts: 1

My app is on a WebSphere Application Server Base, AIX

The probleme is: everything works fine (during one week, one day or one hour) until I get a ClassNotFoundException.

My application tries to load classes with a Class.forName(className)
instruction every time it gets an XML message (the XML message contains the string className).
All the classes of my app are in a jar (in the WEB-INF/lib folder of my ear).

Most of the Class.forName are successful, but some failed I dont know why.
I traced all the package, check the classloading in
verbose mode but I cannot resolve the problem.

When I restart the server, all is normal until a ClassNotFoundException on a random (never the same class) class appears.

Here is the trace.log:

[6/24/05 11:49:43:487 CEST] 3c30e3a2 > UOW= org=IBM prod=WebSphere component=Application Server
loadClass name=com.ingdirect.afp.util.xmlmapper.ReqGetMessagesByCifXMLMapper
[6/24/05 11:49:43:488 CEST] 3c30e3a2 > UOW= org=IBM prod=WebSphere component=Application Server
findClass name=com.ingdirect.afp.util.xmlmapper.ReqGetMessagesByCifXMLMapper
[6/24/05 11:49:43:489 CEST] 3c30e3a2 R UOW= source=SystemErr org=IBM prod=WebSphere component=Application Server

*** 2005/06/24 11:49:43.488: java.lang.ClassNotFoundException: com.ingdirect.afp.util.xmlmapper.ReqGetMessagesByCifXMLMapper
at Code))
at Code))
at java.lang.ClassLoader.loadClass( Code))
at com.ingdirect.afp.util.xmlmapper.MessageHeaderXMLMapper.createMessageBody( Code))
at com.ingdirect.afp.util.xmlmapper.MessageXMLMapper.startElement( Code))
at org.xml.sax.helpers.XMLReaderAdapter.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.xml.sax.helpers.XMLReaderAdapter.parse(Unknown Source)
at com.ingdirect.afp.util.xmlmapper.MessageXMLMapper.parse( Code))
at Code))
at Code))

thanks for help
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 720

Try and replace your JAR from WEB-INF/lib into WAS's classpath. I've experienced similar problems with WAS 5.0, even if in my case the problem was about marshaling and not classpath...

I agree. Here's the link:
subject: ClassNotFoundException on WAS
jQuery in Action, 3rd edition