• 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

ClassNotFoundException, really strange

 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I�m running the examples from the excelent tutorial at: http://developer.java.sun.com/developer/onlineTraining/rmi/RMI.html
and at the exercise Simple Bank System when I try to run the BankSystemServer it give�s me the error:
java.lang.ClassNotFoundException : BankManagerImpl_Stub.class
the funny thing is that I�ve already passed rmic on the remote classes and BankManagerImpl_stub.class is on the directory as I checked, so I�m relly lost here, I�ve tryied to set the classpath also and still don�t work.
I have the following .class files in the directory:
BankManager.class
Account.class
Client.class
NoCashAvailableException.class
AccountImpl.class
BankManagerImpl.class
BankSystemServer.class
BankUser.class
ClientImpl.class
BankManagerImpl_Stub.class
BankManagerImpl_Skel.class
AccountImpl_Stub.class
AccountImpl_Skel.class
ClientImpl_Stub.class
ClientImpl_Skel.class
Any help will be welcome.
thanks in advance.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well, I solved the problem all I did was to reboot my machine and don�t set the classpath to the directory.
If someone has an explanation for it I�m still trying to understand.
regards.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just found an explanation for this problem:
http://java.sun.com/j2se/1.4/docs/guide/rmi/faq.html#regpath
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here's how I fixed the problem.
when you start the rmiregistry program, make sure you explicitly specify the port number:
C:\>rmiregistry 1099
I had the same problem as you and my code now works.
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for posting your solution Marcos. Its really helpful for the next person seraching for a solution to a problem like yours. I wish more people would post their solutions when they get things working.
Chris
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic