Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1504

DefaultSchemaLdifExtractor relies on "java.class.path" environment variable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.5.7
    • 2.0.0-M1
    • None
    • None
    • Tomcat 6.0.26, Sun JDK 1.6.0_16, Windows Vista

    Description

      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.

      Attachments

        Activity

          People

            akiran Kiran Ayyagari
            msched Marian Schedenig
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: