File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes RMI Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI Exception" Watch "RMI Exception" New topic

RMI Exception

Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
Hi ,
I am getting the following error while working with a simple Hello program for RMI.I am working on Windows NT.
This error occurs when i am trying to start the server.
Could anyone tell me what is going wrong.
C:\rahul\SERVER1>java rahul.HelloImpl
Initialising server please wait
HelloImpl err: access denied ( connect,resolve) access denied
( 1 connect,resolve)
at Source)
at Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at<init>(Unknown Source)
at<init>(Unknown Source)
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at rahul.HelloImpl.main(
The programs are as follows

[This message has been edited by Suneel Setlur (edited December 13, 2000).]

First Light

Joined: Nov 27, 2000
Posts: 14
Reason: You did not specify the policy file on the command line should be something like:
java -cp . myprogram
akshay mahajan

Joined: Jan 18, 2001
Posts: 10
i am haveing the same problem. the diff is that the problem is coming when i am running the client program from diff machine & try to access the client m/c
Error is
Also i am trying to connect thru the aPPLET.
You have clarified the doubt But what should be the content of the policyfile & where should it be stored???
asad ali

Joined: Dec 12, 2000
Posts: 20
Check the following link for contents of policy file
Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
Just comment the SecurityManager line and recompile. It will work fine.
I agree. Here's the link:
subject: RMI Exception