-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
6u7
-
None
-
generic
-
generic
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.
"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.
- duplicates
-
JDK-6817315 JNDI classloading does not support multiple javaCodebase values
-
- Closed
-