RE: Problems With FOP in Linux

"Steve Baker" <[email protected]> Fri, 5 Mar 2004 13:51:30 -0000
Newsgroups gmane.comp.krysalis.user
Message-ID <[email protected]>
Hi,

This has resolved the problem and I now have barcodes on my documents.  Many
thanks!

Best regards,
Steve

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Jeremias
Maerki
Sent: 05 March 2004 12:35
To: [email protected]
Subject: Re: Problems With FOP in Linux


Hello Steve,

The code has been designed to work with 0.20.5. There has been a change
inside FOP between rc2 and the final release that renders the barcode
extension incompatible with 0.20.5rc2. So, please upgrade your FOP to
0.20.5 and eveything should work.

By the way, it is not necessary to include all JARs in your FOP
classpath. You only need the following:
- avalon-framework-4.1.4.jar
- krysalis-barcode-fop-ext-0.20.5.jar
- krysalis-barcode.jar

The other JARs are primarily for other extensions (Xalan, SAXON...), for
the command-line application (commons-cli) or for special purposes (jdom,
servlet).

I hope this helps.

On 05.03.2004 12:54:01 Steve Baker wrote:
> 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$FragmentContentDispatc
> 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
<snip/>
> If I remove the snippet, the transformation works again.
>
>
> Any pointers or suggestions would be MUCH appreciated.


Jeremias Maerki



-------------------------------------------------------
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