Java exception: "Can't get a Writer while an OutputStream is already in use" when running xAgent
Posted
by
Steve Zavocki
on Stack Overflow
See other posts from Stack Overflow
or by Steve Zavocki
Published on 2013-10-29T20:54:24Z
Indexed on
2013/10/29
21:54 UTC
Read the original article
Hit count: 480
xpages
I am trying to implement Paul Calhoun's Apache FOP solution for creating PDF's from Xpages (from Notes In 9 #102). I am getting the following java exception when trying to run the xAgent that does the processing --> Can't get a Writer while an OutputStream is already in use
The only changes that I have done from Paul's code was to change the package name. I have isolated when the exception happens to the SSJS line: var jce: DominoXMLFO2PDF = new DominoXMLFO2PDF();
All that line does is instantiate the class, there is no custom constructor. I don't believe it is the code itself, but some configuration issue. The SSJS code is in the beforeRenderResponse event where it should be, I haven't changed anything on the xAgent.
I have copied the jar files from Paul's sample database to mine, I have verified that the build paths are the same between the two databases. Everything compiles fine (after I did all this.) This exception appears to be an xpages only exception.
© Stack Overflow or respective owner