File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes RMI access denied Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "RMI access denied" Watch "RMI access denied" New topic

RMI access denied

Niko Prinz

Joined: Aug 16, 2012
Posts: 15

Heey guys

I have just start to use RMI and a get a some kind of a strange error access denied ("" "NK" "resolve")
at Source)
at Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at Source)
at Source)
at Source)
at Source)
at<init>(Unknown Source)
at<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at 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.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at EnterpriseProgramming.DisplayPerfectTime.main(

Here is my code

can some one plzz help me to find the error thanks !!! ^^

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

That code is for the server part. You also have a class DisplayPerfectTime, which is the client part, which you didn't show us.

Are you running the client in an applet, or another environment which has restrictions? Applets run in a secure environment and can't do things like communicate over the network to any arbitrary server, or read and write files from and to the local filesystem.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: RMI access denied
It's not a secret anymore!