On Apr 17, 2007, at 16:46, Abel Braaksma wrote:

Hi,

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

Small question out of curiosity: how exactly is the XML produced?
I've always wondered. Dumping into a java.lang.String does not seem to me the best way of tackling the issue of generating XML from a database (unless the source files are really nothing but tiny XML fragments)... Never had to do it myself so far, so I don't really know from experience whether there are better options.

That said, the big clue is here, I think:

... This error repeats until I restart the tomcat server. The error in the tomcat log is

If I'm correct, the problem is along the lines of:
Oracle can only use static methods as entry points to Java classes (unless instances of the Java class are stored in a column in the database table). I therefore suspect that your java.lang.String is also a static. I even think it is a static that is not explicitly cleared, so the second time the procedure runs, the output just gets concatenated to the existing String, which results in FOP being fed invalid XML...

But this is just a suspicion. I'd need to see more of the code to be able to say for sure. :/

HTH!

Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to