cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <>
Subject [2.2] Duplicate (and different) versions of batik on classpath
Date Mon, 18 Dec 2006 08:57:22 GMT

I found a problem with the cocoon-batik-impl block. When I add a
dependency to this block, I end up with two different versions of Batik
on my classpath. The first (and correct) one is batik-1.6-1. But due to
a dependency to fop 0.20.5, batik-1.5-fop gets included (which is not
compatible with batik-1.6-1). See the snippet below that I got when
running maven with the -X option:

batik:batik-squiggle:jar:1.6-1:compile (selected for compile)
  batik:batik-swing:jar:1.6-1:compile (selected for compile)
  batik:batik-transcoder:jar:1.6-1:compile (selected for compile)
    fop:fop:jar:0.20.5:compile (selected for compile)
      xml-apis:xml-apis:jar:1.0.b2:compile (removed - nearer found:
      xerces:xercesImpl:jar:2.2.1:compile (removed - nearer found:
      batik:batik-1.5-fop:jar:0.20-5:compile (selected for compile)

When I run the webapp from the commandline, using the maven jetty
plugin, everything seems to work fine. But when I run it in Eclipse
(using the Jetty launcher plugin), I get classpath errors.

First conflict I found was that of o.a.batik.dom.AbstractDocument.<init>
(constructor signature changed in 1.6-1). After removing batik-1.5-fop
jar from my classpath, I ran into another classpath problem.
org.apache.cocoon.xml.dom.SVGBuilder accesses the protected member
'namespaces', which is of type org.apache.batik.dom.util.HashTableStack.
The signature method 'put' has changed from 'put(String, Object)' to
'put(String, String)'. It looks like the cocoon-batik-impl block is
built against batik-1.5-fop, and not batik-1.6-fop.

When I exclude batik-1.5-fop as a dependency, everything seems to work
fine (but I don't know what functionality of batik requires
batik-1.5-fop). It worked either by excluding the dependency from
cocoon-batik-impl's pom.xml (but I had to declare the exclusion several
times), or when I exclude it from fop-0.20.5.pom (from my local

How can this problem be resolved? Anybody interested in the changed pom?


View raw message