• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rmi exception

 
kevin chang
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using this coding in RMIServer

FBNModel model = new FBNModelDbImpl(dbHost);
Naming.rebind("FBN",model);

in debeg window, it shows

FBNRMIServer err : Connection refused to host: 218.79.12.74; nested exception is:
java.net.ConnectException: Connection refused: connect

what's wrong?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using an RMISecurityManager? If so, remove it.
Mark
 
kevin chang
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank marks ,very glad it is u could help me in this question, but another mistake is taken
my rmisever is


my rmiclient is


in the debeg window , it shows
FBNRMIServer err : Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind

i'd appreciate that u could help me to solve the problem in advance.
 
kevin chang
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BY THE WAY , I am very sure that the address is not in use, cause I hava tried to change the port,
but it does useless!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using Naming.rebind. instead of regist.rebind.
That way you also don't need the regist reference or object.
So starting the registry is as simple as

See, no return needed.
Hope that is what ails the code.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic