• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI Server returning a MalformedURL to the client - Resolved

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic