On May 5, 2008, at 16:55, Andreas Delmelle wrote:
On May 5, 2008, at 10:55, Andreas Schröder wrote:

I already posted in the user group, but they only wonder about my error and can't help. So I think that it is a bug.

I use Apache FOP 0.95beta but the same error also occured in 0.94 stable version: When trying to make a new instance of the fop factory with "FopFactory fopFactory = FopFactory.newInstance();" I get an exception with the following stack trace:


java.lang.ClassCastException: org.apache.fop.render.afp.extensions.AFPExtensionHandlerFactory
cannot be cast to org.apache.fop.util.ContentHandlerFactory
<snip />

FWIW, and for all interested parties: Andreas confirmed to me off- list that using only one FopFactory seems to work. So far, he hasn't taken that back, so I'm assuming no news is good news. ;-)

This shows that using only one factory is not merely a matter of 'best practice', it avoids ugly exceptions like the one above.

Of course, Big thanks to Jörg for supplying us with the vital piece of info!


Cheers

Andreas

Reply via email to