On Wed, 2011-09-28 at 18:49 -0400, Barry Hathaway wrote: 
> I'm not having any luck getting Jena to work in an OGSi environment 
> (ServiceMix).

We've used Jena extensively in an OSGi environment though not
ServiceMix.

> I've tried "wrap"ping the Jena jars into separate bundles. I've also 
> built the bundles with
> maven-bundle-plugin.  Then when I try:
>      Model m = ModelFactory.createMemModelMaker().createFreshModel();
> I get:
>      DTDDVFactoryImpl does not extend from DTDDVFactory

Those classes are from Xerces. Check how you have specified that
dependency, maybe ServiceMix has a very old Xerces which is being
incorrectly bound to the bundle.

> I have also tried building a single bundle which includes all the 
> imported jars using the
> pom.xml file from the Clerezza project. This bundle also starts up, but 
> this time when
> I execute the model factory command above I get:
>      nested exception is java.lang.ExceptionInInitializerError


The approach we've used is similar to this - include most of the
dependent jars in the bundle to simplify dependency management. We
package as three bundles - jena, arq and tdb.

In case it helps I've attached pom files for core and arq bundle
projects we use.

[In an ideal world I'd like to ship self-contained bundles like this
from Apache Jena, though the complexities of the Apache and Maven
conventions put me off trying this in the near term.]

Dave

Attachment: pom.xml
Description: XML document

Attachment: pom.xml
Description: XML document

Reply via email to