Bug 49897

Summary: Linkage error on org.w3c.dom.event (OSGi-related)
Product: Batik - Now in Jira Reporter: Rafał Rusin <rafal.rusin>
Component: CSSAssignee: Batik Developer's Mailing list <batik-dev>
Status: NEW ---    
Severity: minor    
Priority: P2    
Version: 1.8   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Rafał Rusin 2010-09-08 10:43:43 UTC
This:
https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/sources/org/w3c/dom/events/

conflicts with http://mirrors.ibiblio.org/pub/mirrors/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar

and gives linkage errors (I used it under equinox OSGi). 

Potential solution is to use xml-apis-1.3.04.jar and move additional events not supported there into org.apache.batik namespace. 

Ragards
Comment 1 Helder Magalhães 2010-10-01 02:07:30 UTC
(In reply to comment #0)
> This:
> https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/sources/org/w3c/dom/events/
> 
> conflicts with
> http://mirrors.ibiblio.org/pub/mirrors/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
> 
> and gives linkage errors (I used it under equinox OSGi). 

I might be missing something here, and in the absence of further comments, could you detail a bit more on this issue? I'm not sure if I'm getting the whole picture. I also didn't understood why setting this as a major issue...

Also, patches are always welcome! ;-)

I'm adjusting this to 1.8 (current trunk code), as AFAIK the situation hasn't changed since the 1.7 release regarding this (we are still using XML APIs 1.3.04 and W3C namespace code has been quite untouched).
Comment 2 Jeremias Maerki 2010-10-01 03:12:59 UTC
I've run into similar issues, BTW. I'm also working in an OSGi environment. I suggest that we work towards removing any W3C DOM sources from Batik and instead cooperate with the Xerces team who maintains xml-apis and xml-apis-ext. I've done these things to my local Batik working copy but right now I don't remember which steps I took exactly. I'll need to find time to replicate that and propose a concrete changes to Batik.

A little background concerning OSGi: Every OSGi bundle (JAR plus manifest metadata) declares exactly which Java packages it imports and which it exports. The OSGi framework then does the wiring of the packages based on version information in a network of class loaders rather than the hierarchical class loader used by normal Java applications. Therefore, problems arise as soon as two JARs provide classes in the same Java package, ex. org.w3c.dom.events.
Comment 3 Helder Magalhães 2010-10-05 18:33:53 UTC
Isn't this issue very similar (possibly even a duplicate, or the way around) of bug 49206?


(In reply to comment #2)
> I've done these things to my local Batik working copy but right now I don't
> remember which steps I took exactly. I'll need to find time to replicate that
> and propose a concrete changes to Batik.

That would be great, Jeremias! :-)