Name: skT45625 Date: 11/07/2000
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
If the remote object name contains a colon (in my case the name is an LDAP
URL), the java.rmi.Naming.lookup method fails to extract the hostname from the
URL. The function cuts off the part after the colon instead of the (3rd) slash
to extract the hostname, eg.: from the
URL "rmi://host.domain/ldap:host2.domain/dn" extracts the "host.domain/ldap" as
hostname instead of "host.domain"
Example source code:
try {
Remote test = Naming.lookup
("rmi://microsoft.com/ldap://ldaphost.domain/o=whatever");
System.out.println("OK.");
} catch (Exception e) {
System.out.println("Error:" +e);
}
Error message:
Error:java.rmi.UnknownHostException: Unknown host: microsoft.com/ldap;
nested exception is:
java.net.UnknownHostException: microsoft.com/ldap
Note: the JDK 1.2.2/05a was free from this bug.
###@###.### 2000-11-07
Was able to reproduce the problem in 1.3, works fine in 1.2.x
(Review ID: 110656)
======================================================================