|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Integrating Apache FOP in an Eclipse RCP app gives IncompatibleClassChangeErrorHi, I’m getting this error when running Apache
FOP as part of an Eclipse RCP application. java.lang.IncompatibleClassChangeError:
Class org.apache.fop.fo.FOTreeBuilder does not implement the requested
interface org.xml.sax.ContentHandler at
com.sun.org.apache.xml.internal.serializer.ToSAXHandler.startDocumentInternal(Unknown
Source) at
com.sun.org.apache.xml.internal.serializer.SerializerBase.startDocument(Unknown
Source) at
rd_adsml_financials_fo.transform() at
com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(Unknown
Source) at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown
Source) at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown
Source) at
dk.reklamedata.archive.DocConverter.xmlToPdf(DocConverter.java:64) DocConverter.xmlToPdf is a simple XML to
PDF conversion, copied from an official Apache FOP example, which works fine if
I run it as a separate class. I have created a separate Eclipse plug-in with all
the required Apache FOP jars, which I suppose is the way to do it with the Eclipse
platform. Anyone else had similar problems when
integrating Apache FOP in an Eclipse RCP app? Best regards, Martin Kristensen / Developer The information in
this message is confidential. It is intended solely for the addressee. Access
to this message by anyone else is unauthorized. If you are not the intended
recipient, do not disclose, copy, or distribute the message without express
permission from the sender. Please contact the sender if you have recieved this
message in error. |
|
|
Re: Integrating Apache FOP in an Eclipse RCP app gives IncompatibleClassChangeErrorFOTreeBuilder does indirectly implement ContentHandler (it's a
DefaultHandler subclass). So what you get here is really strange. I've never seen this. My only explanation is some kind of class loader confusion, i.e. the ContentHandler expected by the ToSAXHandler is a different one from the one accessible in the context of FOP. But since you seem to be using Sun's own Xalan fork (the JDK default), that seems somewhat unlikely. Except if something loaded some JAXP classes with a special class loader that does not consult the system class loader. Something OSGi-ish maybe? I don't know. Good luck finding the trouble spot! On 09.06.2008 15:50:45 Martin Kristensen wrote: > Hi, > > I'm getting this error when running Apache FOP as part of an Eclipse RCP application. > > java.lang.IncompatibleClassChangeError: Class org.apache.fop.fo.FOTreeBuilder does not implement the requested interface org.xml.sax.ContentHandler > at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.startDocumentInternal(Unknown Source) > at com.sun.org.apache.xml.internal.serializer.SerializerBase.startDocument(Unknown Source) > at rd_adsml_financials_fo.transform() > at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(Unknown Source) > at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source) > at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source) > at dk.reklamedata.archive.DocConverter.xmlToPdf(DocConverter.java:64) > > DocConverter.xmlToPdf is a simple XML to PDF conversion, copied from an > official Apache FOP example, which works fine if I run it as a separate > class. I have created a separate Eclipse plug-in with all the required > Apache FOP jars, which I suppose is the way to do it with the Eclipse > platform. > > Anyone else had similar problems when integrating Apache FOP in an Eclipse RCP app? Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: Integrating Apache FOP in an Eclipse RCP app gives IncompatibleClassChangeErrorHi,
I had exactly the same error in the same context. How I solve it : I have renouced to build a separate plug-in which is supposed to encapsulated Apache FOP libraries. I have included directly all needed jars in my own RCP application in a simple "lib" folder, than I linked them to my application adding them in the "classpath" section on the "runtime" page of the "plugin.xml" file. It works great, even when exporting the corresponding "product" that I made from this RCP app. Hope it's help, Fabrice Dubach
|
|
|
RE: Integrating Apache FOP in an Eclipse RCP app gives IncompatibleClassChangeErrorThanks for the help, both of you who answered. One of my colleagues
succeeded in doing it by making a plug-in that contains both all the FOP jars and all the code that accesses them. Martin -----Original Message----- From: Fabrice Dubach [mailto:fabrice92@...] Sent: 12. juni 2008 12:05 To: fop-users@... Subject: Re: Integrating Apache FOP in an Eclipse RCP app gives IncompatibleClassChangeError Hi, I had exactly the same error in the same context. How I solve it : I have renouced to build a separate plug-in which is supposed to encapsulated Apache FOP libraries. I have included directly all needed jars in my own RCP application in a simple "lib" folder, than I linked them to my application adding them in the "classpath" section on the "runtime" page of the "plugin.xml" file. It works great, even when exporting the corresponding "product" that I made from this RCP app. Hope it's help, Fabrice Dubach Martin Kristensen-2 wrote: > > Hi, > > I'm getting this error when running Apache FOP as part of an Eclipse RCP > application. > java.lang.IncompatibleClassChangeError: > (...) > I have created a separate Eclipse plug-in with all the required Apache FOP > jars, which I suppose is the way to do it with the Eclipse platform. > -- View this message in context: http://www.nabble.com/Integrating-Apache-FOP-in-an-Eclipse-RCP-app-gives -IncompatibleClassChangeError-tp17733288p17796549.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
| Free Forum Powered by Nabble | Forum Help |