Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI Server returning a MalformedURL to the client - Resolved

 
Alvin Watkins
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic