Forum Bugs

Java wrapper is not working for bigger files

barrti
Hello,

I have a problem with Java wrapper for PrinceXML for bigger files (one I am using for testing has 15MB).
I turned on debug mode and with smaller files I can see logs from PrinceXML, but when I am trying to generate this 15MB file I cannot see any Prince logs in my Java application.

Do you have any thoughts what can be wrong with it?

Cheers,
Bartek
mikeday
Does the file convert successfully when running Prince from the command-line? Which convert method are you calling in the Java wrapper?
barrti
Hey mikeday,

Yes, it is working correctly from cli. I am using Input to Output stream conversion.
barrti
Do you have any idea why it's not working?
mikeday
I would assume that it's not blocking in the Java wrapper as this just copies the stream a chunk at a time and should not matter how big the input document is, but you can test this by adding some debug logging in Prince.java.

What if you enable output logging with setLog(), does Prince write anything to the log file indicating the beginning of the conversion job?
barrti
There was not any single log entry when I tried with this file.

Edited by barrti

mikeday
That sounds like it's getting stuck in the Java somewhere, which is surprising; is the convert method actually returning or hanging indefinitely?
barrti
It's returning an empty output stream.
mikeday
Would you be able to try running it once but specify the "princedebug" script as the executable instead of the usual "prince" script? For example new Prince("/usr/lib/prince/bin/princedebug"); this will save two files, /tmp/prince.debug and /tmp/prince.strace which you can email me (mikeday@yeslogic.com) for further investigation.