xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: ClassCast-Exception when trying fopfactory.newinstance()
Date Tue, 08 Apr 2008 10:29:33 GMT
Works for me. The ClassCastException doesn't make much sense as the
AFPExtensionHandlerFactory IS an implementation of the
ContentHandlerFactory interface. So I realy don't understand why this
happens. The only reason I can think of is that there's is a mix of
different, incompatible versions of fop.jar in the classpath. But I'm
not sure how this can happen as both the interface and the
implementation are in the same JAR file. So I'd check if your
application classpath is clean. HTH

On 08.04.2008 12:06:36 Andreas Schröder wrote:
> I get a ClassCastException if I try to make an instance with FopFactory.newInstance().
It already used to work but now doesn't any more while I made no changes to the class.
> I type an excerpt from the StackTrace:
> cce: org.apache.fop.render.afp.extensions.AFPExtensionHandlerFactory cannot be cast to
>     at ...
>     at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:165)
>     at de.hc.pdf_from_word.PdfCreator.convertXML2PDF(PdfCreator.java:44)
> That points exactly to my file, where i create the new instance of FopFactory.
> I give you the code of the method, I use:

Jeremias Maerki

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message