Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 62231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:26:36+00:00 2026-05-10T18:26:36+00:00

Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.

  • 0

Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.

My application, using the Java Plugin Framework, appears unable to convert a dom4j-created XML document to Batik’s implementation of the SVG specification.

On the console, I learn that an error occurs:

 Exception in thread 'AWT-EventQueue-0' java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method 'org.apache.batik.dom.svg.SVGOMDocument.createAttribute(Ljava/lang/String;)Lorg/w3c/dom/Attr;' the class loader (instance of org/java/plugin/standard/StandardPluginClassLoader) of the current class, org/apache/batik/dom/svg/SVGOMDocument, and the class loader (instance of <bootloader>) for interface org/w3c/dom/Document have different Class objects for the type org/w3c/dom/Attr used in the signature     at org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(SVGDOMImplementation.java:149)     at org.dom4j.io.DOMWriter.createDomDocument(DOMWriter.java:361)     at org.dom4j.io.DOMWriter.write(DOMWriter.java:138) 

I figure that the problem is caused by a conflict between the original classloader from the JVM and the classloader deployed by the plugin framework.

To my knowledge, it’s not possible to specify a classloader for the framework to use. It might be possible to hack it, but I would prefer a less aggressive approach to solving this problem, since (for whatever reason) it only occurs on Linux systems.

Has one of you encountered such a problem and has any idea how to fix it or at least get to the core of the issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:26:37+00:00Added an answer on May 10, 2026 at 6:26 pm

    LinkageError is what you’ll get in a classic case where you have a class C loaded by more than one classloader and those classes are being used together in the same code (compared, cast, etc). It doesn’t matter if it is the same Class name or even if it’s loaded from the identical jar – a Class from one classloader is always treated as a different Class if loaded from another classloader.

    The message (which has improved a lot over the years) says:

    Exception in thread 'AWT-EventQueue-0' java.lang.LinkageError:  loader constraint violation in interface itable initialization:  when resolving method 'org.apache.batik.dom.svg.SVGOMDocument.createAttribute(Ljava/lang/String;)Lorg/w3c/dom/Attr;'  the class loader (instance of org/java/plugin/standard/StandardPluginClassLoader)  of the current class, org/apache/batik/dom/svg/SVGOMDocument,  and the class loader (instance of ) for interface org/w3c/dom/Document  have different Class objects for the type org/w3c/dom/Attr used in the signature 

    So, here the problem is in resolving the SVGOMDocument.createAttribute() method, which uses org.w3c.dom.Attr (part of the standard DOM library). But, the version of Attr loaded with Batik was loaded from a different classloader than the instance of Attr you’re passing to the method.

    You’ll see that Batik’s version seems to be loaded from the Java plugin. And yours is being loaded from ‘ ‘, which is most likely one of the built-in JVM loaders (boot classpath, ESOM, or classpath).

    The three prominent classloader models are:

    • delegation (the default in the JDK – ask parent, then me)
    • post-delegation (common in plugins, servlets, and places where you want isolation – ask me, then parent)
    • sibling (common in dependency models like OSGi, Eclipse, etc)

    I don’t know what delegation strategy the JPF classloader uses, but the key is that you want one version of the dom library to be loaded and everyone to source that class from the same location. That may mean removing it from the classpath and loading as a plugin, or preventing Batik from loading it, or something else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 113k
  • Answers 113k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer FFI spec # 4.1.1 Import Declarations, impent → " [static]… May 11, 2026 at 10:06 pm
  • Editorial Team
    Editorial Team added an answer It seems to me that this is not a good… May 11, 2026 at 10:06 pm
  • Editorial Team
    Editorial Team added an answer See Installing curl from hackage on Cygwin. May 11, 2026 at 10:06 pm

Related Questions

A while ago we started developing a new project which internally has about 25-30
I've a couple of extension methods I've been developing for a couple of projects,
I'm developing and application that runs as a Windows service. There are other components
I have been developing ASP.Net applications for quite a few years, and I have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.