-
1. Re: RMI and MalformedUrlException
iceryx Sep 15, 2002 12:08 PM (in response to iceryx)I just tried the same code outside of the servlet (cut and paste to a standalone test app), and everything works fine. I am stumped as to why it wouldn't work from within JBoss.
-
2. Re: RMI and MalformedUrlException
iceryx Sep 15, 2002 1:43 PM (in response to iceryx)Ha! I solved it! Basically what was happening is this:
My TEMP and TMP environment variables were set to a path that contained "Documents and Settings". JBoss uses these directories to expand war and ear files into. These then become part of the classpath used by the the web application ClassLoader.
Somehow I think this classpath was being sent to the rmiregistry as part of the server codebase (not completely sure about this). So when rmiregistry tried to download the stub class from the codebase, it was trying to form a url that contained a space, which apparently is illegal. It then threw an exception, "MalformedUrlException: no protocol: and". Of course, the "and" was from "Documents and Settings".
So what I did was (in the JBoss run.bat) to change my TMP and TEMP environment variables to point to a directory with no spaces. I'm not sure which of these variables it is actually using, so I set both. This fixed the problem.
Also, in the process I went to the http://myserver:8080/jmx-console page, which is where I saw the classpath for my web application, which is how I figured this out. This is a great tool to see what is going on in the server.
Jason -
3. Re: RMI and MalformedUrlException
x3ntaur Mar 20, 2003 1:48 PM (in response to iceryx)Good Post. Thanks for taking the time to post your own solution, saved me a lot of time :-)