Hi ds-users,

I’m struggling with running Apache DS in embedded mode. I tried to find a 
tutorial about how to run Apache DS as embedded service but couldn’t find 
anything about it. Is there a tutorial somewhere that shows how to run it in an 
OSGI environment?


I tried:

    public void start(BundleContext context) throws Exception {
        super.start(context);
        ds = new ApacheDsService();
        IPath location = ResourcesPlugin.getWorkspace().getRoot().getLocation();
        IPath dir = location.append(".codetrails/directory");
        File file = dir.toFile();
        file.mkdirs();
        ds.start(new InstanceLayout(file));
    }

I got complains about missing ou=schema.ldif file. I exported a schema but now 
get NullPointerExceptions I cannot make sense of because I don’t have the 
sources for apacheds-service.jar to further debug the output. 

Thus, I tried to run the Maven build create the sources jar files myself. 
Unfortunately I got a BuildException in 

[INFO] ApacheDS Mavibot Partition ........................ FAILURE [0.718s]

that stopped me there. I got tests in error: 

  MavibotEntrySerializationTest.initializationError ? UnsupportedClassVersion 
or...
  MavibotIndexTest.initializationError ? UnsupportedClassVersion 
org/apache/dire...
  MavibotMasterTableTest.initializationError ? UnsupportedClassVersion 
org/apach...
  MavibotRdnIndexTest.initializationError ? UnsupportedClassVersion 
org/apache/d...
  MavibotStoreTest.initializationError ? UnsupportedClassVersion 
org/apache/dire...

Tests run: 5, Failures: 0, Errors: 5, Skipped: 0

I’m a bit surprised that "mvn clean install“ fails with such an error message. 
Does this make sense for you? My java version is „1.7.0_51 - Java(TM) SE 
Runtime Environment (build 1.7.0_51-b13).



Sorry for asking that many questions in just a few days - and thanks for your 
help getting started.
Marcel

Reply via email to