Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6817323

javaCodebase does not support multiple urls

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 6u7
    • core-libs
    • None

      As per the JNDI LDAP documentation at http://www.faqs.org/rfcs/rfc2713.html, the javaCodebase attribute should support providing a list of urls to jar files to load classes from.

      "3.2 javaCodebase

         This attribute stores the Java class definition's locations. It
         specifies the locations from which to load the class definition for
         the class specified by the javaClassName attribute. Each value of
         the attribute contains an ordered list of URLs, separated by spaces.
         For example, a value of "url1 url2 url3" means that the three
         (possibly interdependent) URLs (url1, url2, and url3) form the
         codebase for loading in the Java class definition."

      However, in my tests (a JNDI client that creates an object from a JNDI reference), I have found that only the first url in the space delimited list is used. Classes that in jar files referenced by subsequent urls in the list are not found.

      As a workaround, I have found that I can create a "reference" jar file which contains only a manifest file whose Class-Path entry references each of the jar files to load classes from. When the javaCodebase attribute is set to the url of that reference jar file, all classes are found. However, this requires that all jar files be co-located with the reference jar file. That is, it is not possible to load classes served from two different http servers.

            vtewari Vyom Tewari
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: