directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: [ApacheDS] Running DS 2.0 as embedded service?
Date Wed, 05 Mar 2014 04:03:05 GMT
On Wed, Mar 5, 2014 at 2:46 AM, Marcel Bruch <marcel.bruch@codetrails.com>wrote:

> 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?
>
> take a look at this[1] sample(you can leave the LdapServer parts) and
apply it accordingly in your environment
to work

>
> 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.
>
> ya, there are few more things that need to be done before you call
ds.start(), take a look at that example

> 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).
>
> you can skip the tests for time being and run "mvn clean install
-DskipTests" (mavibot is still under development)

>
>
> Sorry for asking that many questions in just a few days - and thanks for
> your help getting started.
>
np at all, keep them coming

> Marcel


[1]
http://svn.apache.org/viewvc/directory/sandbox/kayyagari/embedded-sample-trunk/

-- 
Kiran Ayyagari
http://keydap.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message