Using JDOM in a URCap

Hi,

i’m having trouble setting JDOM as a dependency for a urcap. I’ve read that the combination with the osgi framework may cause some issues.

Whenever i embed the jdom dependency, the urcap compiles, but when using the specific code i’m always getting a ClassNotFoundException or the wiring fails and the urcap cannot be used.

Did anyone ever tried using jdom and has a proper pom.xml setup that got this to work?

Thank You!

1 Like

Hi,
Add to the code pom.xml
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.6</version>
</dependency>
As well as in pom.xml add
<Embed-Dependency>jdom2</Embed-Dependency>

Hi @doronin.danil,

i tried using serveral jdom versions with the way you described. The Problem comes up when actually using the JDom Code, resulting in ClassNotFound or OSGi Bundle wiring exceptions.

However, using the default javax xml parser works fine, i just wished using jdom would be possible because jdom has a better structure and is easier to use.