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 Andreas Delmelle <an...@telenet.be> on 2008/11/01 12:49:02 UTC
Re: FOP works until web app is re-deployed to Tomcat
On Oct 31, 2008, at 22:16, jhall wrote:
> Andreas Delmelle-2 wrote:
>>
>> Can you do us a favor, and re-run the test with a slight addition?
>> see: http://xmlgraphics.apache.org/fop/faq.html#saxexception-mismatch
>>
>> It will still fail, but it's very likely that, after adding the
>> ErrorListener override to the base Transformer used in your webapp,
>> the stack trace will be slightly more meaningful.
>>
>
> In fact, I did do this, here is the code:
OK, and you still receive the 'Mismatch' error after doing this...
The most obvious cause cannot be the case here (since the document is
valid and resulted in correct output the first time), so it has to be
the less obvious cause: somewhere upstream, an Exception occurred,
which caused the parser to miss an endElement(), but the XSLT
processor swallows the Exception, and FOP only discovers this much
later, at the end of the document.
Until we know exactly what that upstream Exception is, there's
nothing we can do to fix it, work around it or point you in the right
direction...
Can you try forcing a different (version of) XSLT processor (i.e.
either Saxon or a different, more recent version of Xalan) in the
test environment? Even if this is impossible in the production
environment, it could lead to some invaluable info. Chances are that
it's not the base Transformer that swallows the exception, but a
separate one (used for SVG, XMP or another piece of embedded XML,
foreign to the FO namespace) In that respect, it may be important to
know whether you are using any foreign XML, and if yes, whether the
problem persists if this is removed from the document...
Also, do you know if the problem only occurs if the newer version is
also different? (In other words: does it also occur if you re-deploy
the exact same version that was already running?)
How exactly do you use the Transformer and TransformerFactory? Are
they re-created with each call to the webapp, or do you use pooling
of some sort? I'm not sure whether it's relevant here, but note that
TransformerFactory is not thread-safe, unlike FOP's own FopFactory.
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP works until web app is re-deployed to Tomcat
Posted by jhall <jh...@gmail.com>.
Andreas Delmelle-2 wrote:
>
> Can you try forcing a different (version of) XSLT processor (i.e. either
> Saxon or a different, more recent version of Xalan) in the test
> environment?
>
We are using FOP 0.94 with Xalan 2.7.1, which I believe is the most recent
release of Xalan. Is there an older version you recommend? Or, how do I
replace xalan with Saxon? (do I just copy the saxon jars and remove the
xalan jar? I'm not sure how to do this, so if you can explain how, that
would be great.
--
View this message in context: http://www.nabble.com/FOP-works-until-web-app-is-re-deployed-to-Tomcat-tp20271546p20306918.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org