You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2003/04/15 03:23:16 UTC
DO NOT REPLY [Bug 19016] New: -
java.lang.NoClassDefFoundError: org/xml/sax/SAXException
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19016>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19016
java.lang.NoClassDefFoundError: org/xml/sax/SAXException
Summary: java.lang.NoClassDefFoundError: org/xml/sax/SAXException
Product: Fop
Version: 0.20.4
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Blocker
Priority: Other
Component: general
AssignedTo: fop-dev@xml.apache.org
ReportedBy: ozhan@mds.rmit.edu.au
Hi,
I have written a simple script to read in an xml file from the command line and
convert it to pdf. I have put the script in the FOP/source/fop-0.20.4/src
directory. When I run the build script, it compiles okay. However, when I try
and run the compiled code it gives me the following error:
test:ozhan 510% java RenderingEngine input.xml output.pdf
Exception in thread "main" java.lang.NoClassDefFoundError:
org/xml/sax/SAXException
at RenderingEngine.main(Unknown Source)
It appears that the sax library isn't present in my source tree. The code is
shown below:
------
import java.io.*;
import java.lang.*;
import java.util.*;
// FOP libraries
import org.apache.fop.apps.Driver;
import org.apache.fop.apps.Version;
import org.apache.fop.messaging.MessageHandler;
import org.xml.sax.InputSource;
import org.apache.fop.apps.FOPException;
import org.apache.avalon.framework.logger.ConsoleLogger;
import org.apache.avalon.framework.logger.Logger;
class RenderingEngine
{
public static void main(String args[])
{
if (args.length != 2)
{
System.err.println("Usage: % java RenderingEngine " +
"<inputFileName.xml> <outputFileName.pdf>");
System.exit(1);
}
try
{
String inFileName = args[0];
String outFileName = args[1];
try
{
Driver driver = new Driver(new InputSource (inFileName),
new FileOutputStream(outFileName));
driver.setRenderer(Driver.RENDER_PDF);
driver.run();
Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
MessageHandler.setScreenLogger(logger);
driver.setLogger(logger);
}
catch (FOPException ex)
{
//throw new FOPException(ex);
System.err.println("ERROR: " + ex);
}
}
catch (IOException exception)
{
System.err.println(exception);
System.exit(1);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org