Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Security Manger in RMI  RSS feed

 
Suprakash Das
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm new to RMI.
I can't get my RMI application to run when the client is on a different machine.It works when the client is on the same machine.
The error it gives is AccessControlException -access denied.
I believe it has something to with the security.policy file and RMISecurityManager but i'm not sure what to do with them.
Another problem is that when i include the line:
System.setSecurityManager(new RMISecurityManager());
in my Client code the application doesn't run even when the client is the local machine !!! Same error.
Please help.
 
asad ali
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the article in the following URL http://java.sun.com/products/jdk/1.2/docs/guide/security/permissions.html
 
r venkat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,
i too have the same problem with the AccessControlException, i think i am not putting the url correctly in the Naming.rebind().
i tried rmi://<my machine name>/<remote method name>
rmi://<ip address>/<remote method name>
just <remote method name>
as String
how shall i proceed?
bye venkat

 
denish mehta
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Well i use Win 2000 and i ran my programme without Security Manager and it did Fine .is it wrong??
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it run with a custom securitymanager or with the default one?
Does it run with an empty custom securitymanager ?
Do you use a policymanager?
does it run from a client or only from the same machine?
thank you for the info.
is it an applet or an applications? which browser?

Originally posted by denish mehta:
Hi
Well i use Win 2000 and i ran my programme without Security Manager and it did Fine .is it wrong??

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!