• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with NameBoundException

 
Nuzhar Khan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m writing an RMI application and\i
get following error :
======================
WHEN SecurityManager is set to null:
following exception is thrwon by program serve as server....
""java.rmi.ConnectException: Connection refused to host: localhost; nested exception""
on is:
java.net.ConnectException: Connection refused: no further information
=============================================================
WHEN SecurityManager is set :
following exception is thrwon by program serve as server....
""java.rmi.RMISecurityManager@71d8a0a1
java.security.AccessControlException: access denied java.net.SocketPermission(127.0.0.1:1099 connect,resolve)""
Thnax in Advance
 
Axel Honfi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my opinion:
when working with RMI the JVM needs a SecurityManager, without it�s only possible to work with your own machine (that�s my experience), so with SecurityManager set to NULL, the JVM won�t let connections happen. So set the default RMI-SecurityManager and start your programs with java -Djava.security.policy=mypolicy.txt with mypolicy.txt granting all rights.
At least that�s what worked with me.
Good Luck!
 
Brian Healey
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a similar question.
We have 500+ client machines (and growing fast) that we need to be able to update their MS Access db's with new customers each day. These are simple windows client machines, no local servers available. The users are very non-technical and any invlovement with them will likely make the project impossible. We are looking to see if anyone knows if using RMI will be successful.
I would imagine we';d write the code for the jsp and servlet pages as necesary here. Then we'd push out a copy of the 1.4.1 JVM (email?) with the appropriate parameter settings. That way we have taken as much out of the hands of the user (and microsoft) such that it SHOULD work. We may wind up trying a microsoft solution, we've looked at replica db's but nothing microsoft provides is at all what it seems, nor does any documentation or experience that I have had prove that it can be scalable, given our scenario. (if the situation were different and there was time to debug these installs - fine, but there is none)
If anyone can see what I am getting at, and has ANY information, please let me know. Thanks in advance.
bhealey1@verzion.net
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm interesting
I don't set a security manager at all (make no call on the security.policy) an it still works fine for me. Also, from the errors returned, it looks like you ARE trying to work with your local machine, so according to Alex's post, you should be fine anyways without the security manager.
My suggestion is this: Don't set the security manager at all. Take it out of your java call. It may do the exact same thing as Alex is doing where it defaults to allowing everything.
Dunno if that will fix it, but it should be an easy thing to try.
HTH
Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!