-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.4.0
Name: gm110360 Date: 02/21/2002
FULL PRODUCT VERSION :
java full version "1.4.0-b92"
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
Service Pack 2
A DESCRIPTION OF THE PROBLEM :
The path component of a URL can contain spaces, but in the
URL string passed to Naming.lookup(), JDK 1.4 does not
allow this. For example, a call to Naming.lookup() with
the String "rmi://localhost:12345/test test2" fails. It
never failed in JDK 1.3 and earlier.
This is a real problem, since I've got RMI servers in the
field based on JDK 1.1.8, 1.2, and 1.3 that contain spaces
in their registered object's names.
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Compile the test code provided.
2. Run it.
3. See the MalformedURLException
EXPECTED VERSUS ACTUAL BEHAVIOR :
I expect the URL provided in the test code to be a legal,
valid URL. The program will ultimately fail with a
ConnectException, since this is only a test with no actual
remote object. However, the program should not fail with a
MalformedURLException, since the URL provided is fine.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.net.MalformedURLException: invalid URL string:
rmi://localhost:34571/test test2
at java.rmi.Naming.parseURL(Naming.java:266)
at java.rmi.Naming.lookup(Naming.java:78)
at test.main(test.java:9)
Caused by: java.net.URISyntaxException: Illegal character in path at index 26:
rmi://localhost:34571/test test2
at java.net.URI$Parser.fail(URI.java:2701)
at java.net.URI$Parser.checkChars(URI.java:2872)
at java.net.URI$Parser.parseHierarchical(URI.java:2956)
at java.net.URI$Parser.parse(URI.java:2904)
at java.net.URI.<init>(URI.java:565)
at java.rmi.Naming.parseURL(Naming.java:217)
... 2 more
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.net.*;
import java.rmi.*;
public class test
{
public static void main(String[] args) throws Exception
{
URL myURL = new URL("http://localhost:34571/test test2"); //works
Naming.lookup("rmi://localhost:34571/test test2"); //fails
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
None found.
Release Regression From : 1.3.1_02
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 139713)
======================================================================
FULL PRODUCT VERSION :
java full version "1.4.0-b92"
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
Service Pack 2
A DESCRIPTION OF THE PROBLEM :
The path component of a URL can contain spaces, but in the
URL string passed to Naming.lookup(), JDK 1.4 does not
allow this. For example, a call to Naming.lookup() with
the String "rmi://localhost:12345/test test2" fails. It
never failed in JDK 1.3 and earlier.
This is a real problem, since I've got RMI servers in the
field based on JDK 1.1.8, 1.2, and 1.3 that contain spaces
in their registered object's names.
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Compile the test code provided.
2. Run it.
3. See the MalformedURLException
EXPECTED VERSUS ACTUAL BEHAVIOR :
I expect the URL provided in the test code to be a legal,
valid URL. The program will ultimately fail with a
ConnectException, since this is only a test with no actual
remote object. However, the program should not fail with a
MalformedURLException, since the URL provided is fine.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.net.MalformedURLException: invalid URL string:
rmi://localhost:34571/test test2
at java.rmi.Naming.parseURL(Naming.java:266)
at java.rmi.Naming.lookup(Naming.java:78)
at test.main(test.java:9)
Caused by: java.net.URISyntaxException: Illegal character in path at index 26:
rmi://localhost:34571/test test2
at java.net.URI$Parser.fail(URI.java:2701)
at java.net.URI$Parser.checkChars(URI.java:2872)
at java.net.URI$Parser.parseHierarchical(URI.java:2956)
at java.net.URI$Parser.parse(URI.java:2904)
at java.net.URI.<init>(URI.java:565)
at java.rmi.Naming.parseURL(Naming.java:217)
... 2 more
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.net.*;
import java.rmi.*;
public class test
{
public static void main(String[] args) throws Exception
{
URL myURL = new URL("http://localhost:34571/test test2"); //works
Naming.lookup("rmi://localhost:34571/test test2"); //fails
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
None found.
Release Regression From : 1.3.1_02
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 139713)
======================================================================
- relates to
-
JDK-5083594 Different Behaviors parsing hostname with '_' between in 1.3.1 and 1.4.X/1.5
- Resolved