Ian Hendry wrote:
Hi,
I have implemented FOP on an tomcat 5 servlet. The XML data is read
from Oracle 10g to a java.lang.String and then mixed with XSLT from
the file system to produce the PDF. Once I start the tomcat server and
run the servlet all is good and the PDF is produced correctly. When I
run the servlet again I get a "File does not begin with '%PDF-" error.
This error repeats until I restart the tomcat server. The error in the
tomcat log is
[INFO] ERROR: The processing instruction target matching
"[xX][mM][lL]" is not allowed.
I've research this error and it points to white space before the
<?xml version="1.0" encoding="UTF-8">
line in the XML but this seems not to be the case.
Any ideas where to look next??
The error you receive is not from FOP, FOP is only the messenger. The
error is raised by your XML processor, i.e., Xalan or Xerces. Internet
Google gives this:
http://forum.java.sun.com/thread.jspa?threadID=694303&messageID=4033694
It is not allowed to have whitespace before the XML declaration. Make
sure you use valid well-formed XML.
Cheers,
-- Abel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]