You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by pa...@netscape.net on 2002/05/01 19:05:38 UTC

struggling with fop

Hi Gurus, 
I have been struggling with the convertion to PDF using FOP. It was working well for the past few weeks and all of a sudden I am getting this exception error and I have tried everything I could think of. Now, I am seeking for your help!!!! The exception error occurs on the call to 
I have tried both the fop versions 0.20.3 and 0.20.1. both are producing the same error. 

Please help me get going! 

Thank you 


Oliver 

**** xml to pdf code ********* 

Driver dr=new Driver(); 
dr.setRenderer(Driver.RENDER_PDF); 
InputHandler ih=new XSLTInputHandler(xmlFile,xslFile); 
XMLReader p=ih.getParser(); 
dr.setOutputStream(new FileOutputStream(pdfFile)); 
dr.render(p,ih.getInputSource()); 

****** my classpath ****** 
C:\Fop-0.20.1\build\fop.jar;c:\inetpub\classes\sax2.jar;C:\Fop-0.20.1\lib\jimi-1.0;C:\Fop-0.20.1\lib\xalan-2.0.0.jar;C:\Fop-0.20.1\lib\xerces-1.2.3.jar;c:\inetpub\classes\jaxp.jar;C:\inetpub\classes\xml4j.jar;C:\inetpub\classes\xt.jar;C:\Fop-0.20.1\lib\batik.jar;C:\Fop-0.20.1\lib\ant.jar; 


----------------------------------------------------------- 
********** Exception error ********************** 
Exception in thread "main" org.apache.fop.apps.FOPException 
at org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java: 
110) 
at test1.main(test1.java:118) 

--------- 

java.lang.reflect.InvocationTargetException 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. 
java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces 
sorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:324) 
at org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java: 
103) 
at test1.main(test1.java:118) 
Caused by: org.apache.fop.apps.FOPException: javax.xml.transform.TransformerExce 
ption: org.xml.sax.SAXParseException: The string "--" is not permitted within co 
mments. 
at org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHandler.ja 
va:106) 
... 6 more 

--------- 

org.apache.fop.apps.FOPException: javax.xml.transform.TransformerException: org. 
xml.sax.SAXParseException: The string "--" is not permitted within comments. 
at org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHandler.ja 
va:106) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. 
java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces 
sorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:324) 
at org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java: 
103) 
at test1.main(test1.java:118) 




__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


Re: struggling with fop

Posted by "J.Pietschmann" <j3...@yahoo.de>.
pandianoliver@netscape.net wrote:
> Hi Gurus, 
> I have been struggling with the convertion to PDF
 > using FOP. It was working well for the past few
 > weeks and all of a sudden I am getting this exception
 > error and I have tried everything I could think of.
 > Now, I am seeking for your help!!!! The exception
 > error occurs on the call to
> I have tried both the fop versions 0.20.3 and 0.20.1.
 > both are producing the same error.

Those who can read can avoid some embarassements.

> Caused by: org.apache.fop.apps.FOPException: javax.xml.transform.TransformerExce 
> ption: org.xml.sax.SAXParseException: The string "--" is not permitted within co 
> mments.
                                                 ^^^^^^^^^
Probably you have something commented out which already
contained a comment, either in your XML or XSL. Get an
XML editor with syntax highlighting and hunt for "--" in
comments, some products will even give you a precise
error location. Replace it with "- -" or whatever.

J.Pietschmann