aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic



Joined: Jun 25, 2003
Posts: 8
I'm trying to call an RPG program from java using a PCML class. All classes are compiled ok but at runtime I get ...
java.lang.NoClassDefFoundError: org/apache/xerces/framework/XMLParser
Joel McNary

Joined: Aug 20, 2001
Posts: 1817

What does your CLASSPATH look like? Have you included the Xerces jar file in you Classpath (I think that it's called XercesImpl.jar).

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.

Joined: Jun 25, 2003
Posts: 8
It's in the xerces.jar and I have it in the classpath. I even downloaded the newest version.
jomy davis

Joined: Aug 25, 2004
Posts: 1
I too had the same problem and i found out that the problem comes from different versions of jt400.jar,data400.jar and xml4j.jar.
Strangely on the AS400 there are multiple copies of these files available
I solved the problem by creating a standalone program and testing with different versions of the files till i got it rt adn then adding these files to the web application classpath.
public class PCMLTest {

public static void main(String[] args) throws PcmlException {
AS400 as400 = new AS400("ip","user","password");
System.out.println("as400 obj created");
String pcmlFileName="TestPcml.pcml";
ProgramCallDocument pcd=new ProgramCallDocument(as400 , pcmlFileName);
System.out.println("Initialisation of pcml is thru");

The original problem i had was that it said xerces/XMLParser file was missing(NoClassDefFound) even though the file was present in the classpath and accessible.
Hope it helps
[ August 25, 2004: Message edited by: jomy davis ]
I agree. Here's the link:
subject: NoClassDefFoundError