This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

RMI Server returning a MalformedURL to the client - Resolved  RSS feed

 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!