WebViewerExample "causing" MalformedURLException on JBoss [message #195260] |
Thu, 12 October 2006 15:43  |
Eclipse User |
|
|
|
Originally posted by: Patrick.Lai.broadvision.com
I've run into a strange problem on JBoss when BIRT's WebViewerExample
is used. I have something like this in my application:
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".
final URL url2 = new URL(externalForm);
This code works as expected, until I view the sample report in
WebViewerExample. After that, the last line (new URL("jndi:..."))
fails with the following exception:
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)
...
I am using JBoss 4.0.1SP1 and JBoss 4.0.4GA. I have not been able to
reproduce the problem on Tomcat 5.5.20 and Tomcat 5.0.28, so it is
likely a JBoss issue. I wonder if anyone else has run into this
problem, and whether there is any work-around. Thanks.
-- Patrick
|
|
|
Re: WebViewerExample "causing" MalformedURLException on JBoss [message #199610 is a reply to message #195260] |
Tue, 07 November 2006 11:07  |
Eclipse User |
|
|
|
Originally posted by: Patrick.Lai.broadvision.com
This is a known bug that has been fixed:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=156877
-- Patrick
Patrick Lai wrote:
> I've run into a strange problem on JBoss when BIRT's WebViewerExample
> is used. I have something like this in my application:
>
> 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".
>
> final URL url2 = new URL(externalForm);
>
> This code works as expected, until I view the sample report in
> WebViewerExample. After that, the last line (new URL("jndi:..."))
> fails with the following exception:
>
> 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)
> ...
>
> I am using JBoss 4.0.1SP1 and JBoss 4.0.4GA. I have not been able to
> reproduce the problem on Tomcat 5.5.20 and Tomcat 5.0.28, so it is
> likely a JBoss issue. I wonder if anyone else has run into this
> problem, and whether there is any work-around. Thanks.
>
> -- Patrick
|
|
|
Powered by
FUDForum. Page generated in 0.07464 seconds