[
http://jira.jboss.com/jira/browse/JBAS-3759?page=all ]
PickATrail updated JBAS-3759:
-----------------------------
Summary: MalformedURLException: unknown protocol: jndi (was:
MalformedURLException for "jndi" protocol)
Description:
I am getting a MalformedURLException when I instantiate a URL with the "jndi"
protocol. Here's some example JSP code:
final ServletContext ctx = session.getServletContext();
final String resourcePath = "/WEB-INF/web.xml";
final URL url = ctx.getResource(resourcePath);
final String externalForm = url.toExternalForm();
// The value of externalForm is something like
// "jndi:/localhost/problem/WEB-INF/web.xml".
// The following line fails under some specifi situation
// -- read on :)
new URL(externalForm);
This code usually works as expected. However, if I deploy and access the BIRT
WebViewerExample application (BIRT
is an
Eclipse.org project), the 'new URL("jndi:....")' line fails with
the following stack trace:
java.net.MalformedURLException: unknown protocol: jndi
at java.net.URL.(URL.java:544)
at java.net.URL.(URL.java:434)
at java.net.URL.(URL.java:383)
at org.apache.jsp.index_jsp._jspService(...)
...
This is really puzzling because the URL class remembers the protocol handlers, and I have
already instantiated a URL for
"jndi" successfully.
I have tried to reproduce the problem on Tomcat 5.5.20 and 5.0.28, without success. So it
seems to be a JBoss specific
problem. I'm using JBoss 4.0.4 GA on Linux; JVM build is 1.4.2_11-b06. The version
of BIRT I use is 2.1.1.
was:
I am getting a MalformedURLException when I instantiate a URL with the "jndi"
protocol. Here's some example JSP code:
final ServletContext ctx = session.getServletContext();
final String resourcePath = "/WEB-INF/web.xml";
final URL url = ctx.getResource(resourcePath);
final String externalForm = url.toExternalForm();
// The value of externalForm is something like
// "jndi:/localhost/problem/WEB-INF/web.xml".
// The following line fails under some specifi situation
// -- read on :)
new URL(externalForm);
This code usually works as expected. However, if I deploy and access the BIRT
WebViewerExample application (BIRT
is an
Eclipse.org project), the 'new URL("jndi:....")' line fails with
the following stack trace:
java.net.MalformedURLException: unknown protocol: jndi
at java.net.URL.(URL.java:544)
at java.net.URL.(URL.java:434)
at java.net.URL.(URL.java:383)
at org.apache.jsp.index_jsp._jspService(...)
...
This is really puzzling because the URL class remembers theprotocol handlers, and I have
already instantiated a URL for
"jndi" successfully.
I have tried to reproduce the problem on Tomcat 5.5.20 and 5.0.28, without success. So it
seems to be a JBoss specific
problem. I'm using JBoss 4.0.4 GA on Linux; JVM build is 1.4.2_11-b06. The version
of BIRT I use is 2.1.1.
-- Patrick Lai
MalformedURLException: unknown protocol: jndi
---------------------------------------------
Key: JBAS-3759
URL:
http://jira.jboss.com/jira/browse/JBAS-3759
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Web (Tomcat) service
Affects Versions: JBossAS-4.0.4.GA
Environment: Liinux (SuSE 10)
JVM: Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)
Reporter: PickATrail
Assigned To: Remy Maucherat
Attachments: problem.war
I am getting a MalformedURLException when I instantiate a URL with the "jndi"
protocol. Here's some example JSP code:
final ServletContext ctx = session.getServletContext();
final String resourcePath = "/WEB-INF/web.xml";
final URL url = ctx.getResource(resourcePath);
final String externalForm = url.toExternalForm();
// The value of externalForm is something like
// "jndi:/localhost/problem/WEB-INF/web.xml".
// The following line fails under some specifi situation
// -- read on :)
new URL(externalForm);
This code usually works as expected. However, if I deploy and access the BIRT
WebViewerExample application (BIRT
is an
Eclipse.org project), the 'new URL("jndi:....")' line fails with
the following stack trace:
java.net.MalformedURLException: unknown protocol: jndi
at java.net.URL.(URL.java:544)
at java.net.URL.(URL.java:434)
at java.net.URL.(URL.java:383)
at org.apache.jsp.index_jsp._jspService(...)
...
This is really puzzling because the URL class remembers the protocol handlers, and I have
already instantiated a URL for
"jndi" successfully.
I have tried to reproduce the problem on Tomcat 5.5.20 and 5.0.28, without success. So
it seems to be a JBoss specific
problem. I'm using JBoss 4.0.4 GA on Linux; JVM build is 1.4.2_11-b06. The version
of BIRT I use is 2.1.1.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira