• 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 does not work

 
Greenhorn
Posts: 27
Firefox Browser MySQL Database BSD
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I've basically completed my assignment, there's only one nit that fails. I export my stub in the following way:



The RMI registry is running on the standard port, service is properly initialized and config.getListenPort() returns a legal value but I got the following exception:



The referred line is that of registry.rebind(). I don't understand why it cannot found the class. The package is imported and even if I explicitly specify its location with -cp, same error occurs.

Any hints?

Thanks in advance.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gabor Kovesdan wrote:The package is imported and even if I explicitly specify its location with -cp, same error occurs.


What do you mean with "the package is imported"?

Don't forget you are not allowed to set any other command line arguments than the one specified in the instructions (alone, server, <nothing>)
 
Gabor Kovesdan
Greenhorn
Posts: 27
Firefox Browser MySQL Database BSD
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just meant the proper import statement is there, although that's trivial because it wouldn't have compiled without it.
As for -cp, yes, I know, it was just an idea to try... I used to work with RMI and that time it just worked. I also googled a lot and checked tutorials but I don't know why is there this strange exception.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And what happens if you try to follow (and run) the RMI tutorial example? You should be able to get that one running and then you can compare with your own solution and see what's different.

Good luck!
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy, Gabor.

Champ, try the following:

 
Gabor Kovesdan
Greenhorn
Posts: 27
Firefox Browser MySQL Database BSD
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot, Roberto, it works with createRegistry(). Your post also helped me to realize that I misinterpreted the port setup. Now I only have to polish some nits and write the documentation.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic