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 Amin Ahmad <am...@gmail.com> on 2009/01/18 22:08:33 UTC

Re: Integrating Apache FOP in an Eclipse RCP app gives IncompatibleClassChangeError

I just ran into the same problem. Ideally, you want Apache FOP bundled as a
separate plug-in, but based on what I've read here, you've scrapped that
approach and moved FOP into the same plug-in as the client code because of
this error.
Keep FOP in a separate plug-in but remove the two jars xml-apis and
xml-apis-ext. When these JARs are present in the FOP plug-ins
classpath, FOTreeBuilder implements the ContentHandler interface defined in
the xml-apis JAR, which leads to the incompatible class change error (why
this should be is baffling, but I figure it has something to do with the way
OSGI handles dependencies). When you remove these JARs it falls back to
using the JDK/Eclipse standard ContentHandler class and the error goes away.

I hope this helps,
Amin

On Tue, Jun 17, 2008 at 4:25 AM, Martin Kristensen <mk...@reklamedata.dk>wrote:

> Thanks 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@gmail.com]
> Sent: 12. juni 2008 12:05
> To: fop-users@xmlgraphics.apache.org
> 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<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@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>