Meaningless Drivel is fun!*
The moose likes Distributed Java and the fly likes RMI Server returning a MalformedURL to the client - Resolved Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI Server returning a MalformedURL to the client - Resolved" Watch "RMI Server returning a MalformedURL to the client - Resolved" New topic
Author

RMI Server returning a MalformedURL to the client - Resolved

Alvin Watkins
Ranch Hand

Joined: May 25, 2011
Posts: 53
I am new to Ubuntu. This RMI code has been working on Windows for months (refactored from earlier code that has worked there for years). When I run on Ubuntu, I get a MalformedURL exception. When I start the server, it comes up fine and it appears my WAR in Tomcat is calling my server and getting a response, but it does not like the response format which I don't know how to change. Here is my server:



Here is my client:



The error is:

Alvin Watkins
Ranch Hand

Joined: May 25, 2011
Posts: 53
In case anyone ever has this problem... This was purely my ignorance with dealing with Unix type commands.

When you run a RMI server, you have to create a policy file. You also have to do a few other things before you 'java' your server.jar. Consider the codebase param... It is usually on the command line with your other params and defined such as -"Djava.rmi.server.codebase=%pathtocodebase%server.jar" (without the quotes). In Linux, that has to be appended with the word "file:" such as -Djava.rmi.server.codebase=file:%pathtocodebase%server.jar.

Sheesh. Finally back live.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI Server returning a MalformedURL to the client - Resolved