directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <>
Subject Re: [ApacheDS] Class path problems when embedding 1.5.6/1.5.7 in a Tomcat servlet
Date Tue, 18 May 2010 09:30:30 GMT
hi Marian,

On Mon, May 17, 2010 at 6:31 PM, SCHEDENIG Marian
<> wrote:
> Kiran Ayyagari wrote:
>> can't say whats happening without looking at your initialization
>> code however
>> can you take a look at the initSchema() method in [1].
>> Having said this I have faced an issue with JarLdifSchemaLoader
>> when used in a servlet container, but
>> when used LdifSchemaLoader the problem was solved.
> The problem actually arises before the schema loader is called:
> SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
> extractor.extractOrCopy();
> This will search for schema files in the class path, assuming that the environment variable
"java.class.path" contains all the libraries/jars available to the current class loader. However,
in Tomcat (at least Tomcat 6, that is), that environment variable contains only one single
entry, Tomcat's own bootstrap.jar. As a result, the LDIF extractor finds no matches and copies
no files, the working directory is empty and the schema loader complains that it can't find
found the issue, can you file a bug report in JIRA, will fix it in trunk

> ApacheDS initialisation goes like this:
>        DirectoryServiceFactory factory = DefaultDirectoryServiceFactory.DEFAULT;
>        factory.init("default");
btw, using DirectoryServiceFactory in production code is not
recommended, cause this stores all the data in a
temporary location and is intended to be used for testing purpose only.

Kiran Ayyagari

View raw message