• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rmi and package problem

 
Beny Na
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

my Rmi is working fine when i put all the required classes in the same directory.
"/root/SCJD/src/suncertify/db"
i run rmic Data.java
rmicregistry
java Data ( i just using Data.java to test my rmi here)
and a GUI is running on another computer and it can query all the record, add from Data class, all is working fine.

but when i put a package statement in all classes with "package suncertify.db;" it is not working at all.
what i have done is :
from "/root/SCJD/src/suncertify/db" directory i run a command :
java -d /root/SCJD/classes *.java
and from /root/SCJD/classes i run command :
rmic suncertify.db.Data
and from /root/SCJD/classes/suncertify/db directory i run a command
rmiregistry
and from /root/scjd/classes i run command java suncertify.db.Data

then when a GUI try to connect to server from antoher computer, i got the problem

C:\SCJD\classes>java suncertify.db.GUI
java.rmi.NotBoundException: Remote
at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:106)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at suncertify.db.GUI.<init>(GUI.java:41)
at suncertify.db.GUI.main(GUI.java:253)

any one know what is the cause of adding package statement in all my java classes(adding "package suncertify.db; ")



thanks


kaizen
 
Beny Na
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just ignored the previous post, problem solved.
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic