Submitted On 16-MAR-2002
pleursoft
The given workaround will not work in a servlet container
such as tomcat which already sets the
URLStreamHandlerFactory on java.net.URL. This handler can
only be registered once in the VM (which is pretty silly btw.).
Submitted On 10-APR-2002
jcaron
I suspect that this is also preventing applications that
use WebStart from using java.protocol.handler.pkgs property
to set protocol handlers. (I will file this as a seperate
report).
IMHO, this is a bug, not an RFE.
Submitted On 22-APR-2002
marc_carrion
I also think this rfe should be an error.
Submitted On 22-APR-2002
marc_carrion
Sorry, I mean, I think this rfe should be a bug, too
Submitted On 28-JUN-2002
sisqbatas
In my opinion, this should be a bug too, since I think it
wasn't expected to work only with handlers loaded by the
system classloader.
BTW, is there any plan to fix it? It was reported 3 months
ago and it's not fixed neither in 1.4.01 nor in 1.4.1 (the
solution doesn't seems so difficult) ...
Submitted On 26-JUL-2002
asmodeus
I can confirm that this issue does affect WebStart.
It prevents my project from loading XSLT fragments with
a custom resource: URL
Submitted On 24-DEC-2002
tangjia
Although webstart does not set its own
URLStreamHandlerFactory, custom URLStreamHandlerFactory
can be set to load custom resources. However,
JNLPClassLoader has the same problem above,
See also 4768774. So even if I use my own
URLStreamHandlerFactory, in my situation, it does't work.
This bug should be fixed ASAP!!!!!!
Submitted On 24-DEC-2002
tangjia
d
Submitted On 24-DEC-2002
tangjia
sorry, this should be a bug. It does affect webstart, which in
my project, leads to ClassCircularityError when I am trying to
load custom resources from tomcat.
Submitted On 22-NOV-2004
NiclasH
This is very serious, and NOT A BUG. So please change this ticket to a Bug instead of RFE since it won
Submitted On 22-NOV-2004
NiclasH
This is very serious, and NOT A BUG. So please change this ticket to a Bug instead of RFE since it will not get any attention otherwise.
It was not fixed for Tiger. There is NO suitable workaround. There are at least two reasonable fixes;
a. Change so that the real callers classloader, and not java.net.URL is used.
b. Use Context classloader.
Somehow, I think the security implications is a bad excuse, and I would really like to see the summary of the security concerns involved, as I think there are no such evaluation done.
Submitted On 11-DEC-2006
superuser33
How about a reasonable API for this instead, maybe for JDK7?
All we really need is 2 static methods:
setURLStreamHandler(String protocol, URLStreamHandler handler);
getURLStreamHandler(String protocol);
Old package-based method can be kept for 100% backwards compatibility.
Sound reasonable?
Submitted On 16-OCT-2007
URL.setURLStreamHandlerFactory() may help
http://java.sun.com/j2se/1.4.2/docs/api/java/net/URL.html#setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory)
Submitted On 26-FEB-2008
This bug is still present in JDK 6 with Tomcat 5.5 and renders java.net.URL useless when passing URL specs containing 3rd party schemes.
This ticket should receive more attention IMHO.
I have started a discussion on this on the Tomcat mailing list:
http://thread.gmane.org/gmane.comp.jakarta.tomcat.user/162598
Submitted On 26-FEB-2008
In addition to my last comment, here is my take on this issue:
My proposal is to move the code performing checks for existing URL handlers from the constructor to the time when a client actually tries to open a connection from that URL.
I also consider it bad design that java.net.URL throws MalformedUrlException on construction when merely a handler is missing for the given protocol but the URL spec itself is wellformed. Conformity of a URL spec and connection handling are completely separate concerns, and should be handled as such.
Submitted On 04-MAR-2008
bestsss
this is a bug and a bad design
actually TCL may not be used since the instance is kept forever (or at least a URLStreamHandleFactory is installed) in a private Hashtable effectively making the Handler publicly visible (not only to the caller Thread).
That would prevent any garbage collection and isolation of web-apps, no redeploy, etc.
Most of all that's a very serious bug w/ any application relying on Web Start. Mildly put - they don't work w/o custom URLStreamHandler...
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|