directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiran Ayyagari (JIRA)" <>
Subject [jira] Resolved: (DIRSERVER-1504) DefaultSchemaLdifExtractor relies on "java.class.path" environment variable
Date Tue, 18 May 2010 16:56:44 GMT


Kiran Ayyagari resolved DIRSERVER-1504.

    Fix Version/s: 2.0.0-RC1
       Resolution: Fixed

Instead of mucking around the classpath inside a servlet container, I have added some code
to load the schema from a resource path
specified using a system property 
The key name is 'schema.resource.location' and its usage is given below

 This system property can be used to load schema from a user specified resource like a absolute
path to a directory or jar file.
 This is useful to start embedded DirectoryService in a servlet container environment


> DefaultSchemaLdifExtractor relies on "java.class.path" environment variable
> ---------------------------------------------------------------------------
>                 Key: DIRSERVER-1504
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.7
>         Environment: Tomcat 6.0.26, Sun JDK 1.6.0_16, Windows Vista
>            Reporter: Marian Schedenig
>            Assignee: Kiran Ayyagari
>            Priority: Critical
>             Fix For: 2.0.0-RC1
> When initialising ApacheDS, DefaultSchemaLdifExtractor is invoked by to read default
LDIF files. To find these files, regular expressions are applied to all JARs found in the
class path. The class path is found by reading the environment variable "java.class.path".
> This is done in ResourceMap#getResources():
>         String classPath = System.getProperty( "java.class.path", "." );
>         String[] classPathElements = classPath.split( File.pathSeparator );
> There is no guarantee that "java.class.path" contains all the JARs available to the current
class loader. For example, in Tomcat 6, the variable only contains one single entry, Tomcat's
own bootstrap.jar. Result: DefaultSchemaLdifExtractor fails to find and extract any LDIF files,
and JarLdifSchemaLoader throws an exception when an expected schema file is not available.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message