File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError

 
DANIELA PINES
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Help
 
Joel McNary
Bartender
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your CLASSPATH look like? Have you included the Xerces jar file in you Classpath (I think that it's called XercesImpl.jar).
 
DANIELA PINES
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's in the xerces.jar and I have it in the classpath. I even downloaded the newest version.
 
jomy davis
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic