RE: Problems With FOP in Linux
"Harry LeBlanc" <[email protected]> Fri, 5 Mar 2004 09:33:09 -0600
| Newsgroups | gmane.comp.krysalis.user |
|---|---|
| Message-ID | <[email protected]> |
Check to make sure you don't have earlier versions of any of the jars (avalon, xerces, etc) in your classpath. I got burned on this one -- I had the latest jars, but I *also* had the earlier avalon jar that was bundled with fop, and that was being found first & choking. > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Steve > Baker > Sent: Friday, March 05, 2004 5:54 AM > To: [email protected] > Subject: Problems With FOP in Linux > > > I've been struggling with the installation of version 1.0beta in a Linux > environment, using fop 0.20.5rc2 for the last couple of days. > > I've copied the following files to the Fop /build directory: > krysalis-barcode-fop-ext-0.20.5.jar > krysalis-barcode.jar > > I've copied the following files to the Fop /lib directory: > avalon-framework-4.1.4.jar > commons-cli-1.0.jar > jdom.jar > saxon-6.5.3.jar > servlet-2.2.jar > xalan-2.4.1.jar > xercesImpl-2.2.1.jar > xml-apis.jar > > I've moved the old avalon file out of the Fop /lib directory: > avalon-framework-cvs-20020806.jar > > I've added the new files to the classpath in fop.sh, so that it is now set > to: > ./lib/xml-apis.jar: > ./lib/xercesImpl-2.2.1.jar: > ./lib/xalan-2.4.1.jar: > ./lib/servlet-2.2.jar: > ./lib/saxon-6.5.3.jar: > ./lib/jdom.jar: > ./lib/commons-cli-1.0.jar: > ./lib/batik.jar: > ./lib/avalon-framework-4.1.4.jar: > ./build/fop.jar: > ./build/krysalis-barcode-fop-ext-0.20.5.jar: > ./build/krysalis-barcode.jar: > > However, when I try to run the example fop script, I get the following > output: > [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser > [INFO] FOP 0.20.5rc2 > [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser > [INFO] building formatting object tree > [INFO] setting up fonts > Exception in thread "main" java.lang.AbstractMethodError > at > org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:255) > at > org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown > Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentCont entDispatc > her.dispatch(Unknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source) > at > org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) > at > org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at org.apache.fop.apps.Driver.render(Driver.java:457) > at > org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:69) > at org.apache.fop.apps.Fop.main(Fop.java:19) > > > I also modified one of my own XSL documents to include the example Fop > snippet: > <fo:block> > <fo:instream-foreign-object> > <barcode:barcode xmlns:barcode="http://www.krysalis.org/barcode/ns" > msg="my message"> > <barcode:code39> > <barcode:height>8mm</barcode:height> > </barcode:code39> > </barcode:barcode> > </fo:instream-foreign-object> > </fo:block> > > But this also fails: > # ./fop.sh -xml ./invoice.xml -xsl ./inv_stylesheet.xsl ./invoice.pdf > > [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser > [INFO] FOP 0.20.5rc2 > [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser > [INFO] building formatting object tree > [INFO] setting up fonts > Exception in thread "main" java.lang.AbstractMethodError > at > org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:255) > at > org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTre eHandler.j > ava:856) > at > org.apache.xalan.transformer.ResultTreeHandler.flushPending(Result TreeHandle > r.java:931) > at > org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTr eeHandler. > java:306) > at > org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralRe sult.java: > 684) > at > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates > (Transform > erImpl.java:2182) > at > org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(T ransformer > Impl.java:2008) > at > org.apache.xalan.transformer.TransformerImpl.transformNode(Transfo rmerImpl.j > ava:1171) > at > org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.j ava:3135) > at > org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(Tr ansformerH > andlerImpl.java:433) > at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown > Source) > at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown > Source) > at > org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) > at > org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(Unknown Source) > at > org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatch er.dispatc > h(Unknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source) > at > org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) > at > org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at > org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:134) > at org.apache.fop.apps.Driver.render(Driver.java:457) > at > org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:69) > at org.apache.fop.apps.Fop.main(Fop.java:19) > > If I remove the snippet, the transformation works again. > > > Any pointers or suggestions would be MUCH appreciated. > > Best regards, > Steve > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > krysalis-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/krysalis-users > ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click