• 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:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

AccessException: unknown host

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In spite of following all of the steps in Gopalan's RMI tutorial
<http://www.execpc.com/~gopalan/java/java_rmi.html>;
things still aren't working. I get a nested AccessException: unknown host. Does anyone have an idea what I'm doing wrong? Thanks for any tips.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
UnknownHostException is encountered when RMI is unable to resolve the server host name. If you are working on a stand alone machine then TCP/IP must be configured.
To experiment with RMI on a single machine, you must provide the name of the machine. To find out the name of your machine, go to the control panel of start menu and select �Network.� Click on the "Identification" tab, and you�ll see your computer name. In my case, I call my computer "compaq".
TCP / IP connection will have to be active. This means that you must connect to your Internet service provider before trying to run the program or you�ll get some obscure exception messages.
Regards,
Milind
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Milind,
Please help I trying to run my first RMI Program on windows 98 (stand alone). My Stub and Skel classes in same directory and I run the rmiregistry from that directory.
But When I run my server using following.
java -Djava.rmi.server.codebase=c:\developer_assignment\working\suncertify\db\ -classpath <myclasspath> DataProxy
I get following error:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: suncertify.db.DataProxy_Stub
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: suncertify.db.DataProxy_Stub
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: suncertify.db.DataProxy_Stub
java.lang.ClassNotFoundException: suncertify.db.DataProxy_Stub
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:249)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
224)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:358)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:165)
at suncertify.db.DataProxy.main(DataProxy.java:56)

BTW I am not running any http server.
am I invovking my server properly??? Please send some comments, I am really in need of some help.

Regards
Sanjay
 
tony f
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Milind,
Thanks for those tips. I've now got things working.
Is there any RMI book you can recommend? I'm currently using "Java Enterprise in a Nutshell" from O'Reilly. While it is a good book, it doesn't cover these basic beginners' problems.
Thanks again, Tony.
 
Catch Ernie! Catch the egg! And catch this tiny ad too:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic