LinkageError when using DOM/XPath in IDEA plugin

I am currently writing an IDEA plugin which (among other things) reads an HTML page and extracts data from it based on an XPath expression. For this I use the Neko HTML parser in the following way:

When I run that stuff, I get the following error thrown on the last line:

Does anyone here know whether I am doing something wrong here? Or is it an IDEA bug?


1 comment
Comment actions Permalink

Hello Jens,

the reason for the problem is most probably that your plugin's libraries include
the org.w3c.dom.* classes that are already loaded from the JDK that IDEA is
running with. I know the effect from using JTidy inside JBoss, so I highly
suspect that the Neko HTML parser you're using also has those classes bundled in
its .jar file. Removing all org.w3c.* classes from it should solve your problem.



Please sign in to leave a comment.