Hi,

am about to convert an existing OSGi project that uses Jena 2.6.4 to another 
framework (from Eclipse Equinox to Apache Felix in combination with BndTools). 
The old project on Equinox worked very well, however, I have some trouble with 
the new framework. In order to include the Jena libraries into my project, I 
created a new "Plugin from existing JAR Archives". I exported that to a 
deployable Plugin and put that into my local repository. From there I could add 
it to my project's build path. It seemed to work well. It could be compiled, 
but when I started the project, on the first access to Jena (createResource) a 
NoClassDefFoundException on org.xml.sax.SAXException. To solve this problem, I 
decided to upgrade the Jena libraries to 2.7 (from a here). So I did the exact 
same steps as above. The project, again, could compile and ran a little 
further. Now, the createResource-call did not crash and worked very well. 
However, the project crashed while performing a SPARQL-Query. Here's an excerpt 
of the stack trace:
java.lang.NoClassDefFoundError: javax/management/MalformedObjectNameException
    at com.hp.hpl.jena.query.ARQ.init(ARQ.java:437)
    at com.hp.hpl.jena.query.ARQ.<clinit>(ARQ.java:456)
    at com.hp.hpl.jena.query.Query.<clinit>(Query.java:62)
    at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:80)
    at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:52)
    at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:40)
    at 
com.hp.hpl.jena.query.QueryExecutionFactory.makeQuery(QueryExecutionFactory.java:517)
    at 
com.hp.hpl.jena.query.QueryExecutionFactory.create(QueryExecutionFactory.java:193)

And, indeed, I was not able to find the definition of this exception in the 
Jena libraries. Have I missed anything? Or any other ideas, how to solve this?

Nico

Reply via email to