Solved

Java RMI

Posted on 2004-10-04
5
247 Views
Last Modified: 2010-03-31
Hi

I am getting the following exception when I Run my RMI Server.... do i have to a policy file or something .. if yes where should i put this policy file

Please help

Thanks
- C

java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)

      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)

      at java.security.AccessController.checkPermission(AccessController.java:401)

      at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)

      at java.lang.SecurityManager.checkConnect(SecurityManager.java:1026)

      at java.net.Socket.connect(Socket.java:446)

      at java.net.Socket.connect(Socket.java:402)

      at java.net.Socket.<init>(Socket.java:309)

      at java.net.Socket.<init>(Socket.java:124)

      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)

      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)

      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)

      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)

      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)

      at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)

      at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)

      at java.rmi.Naming.rebind(Naming.java:160)

      at rmitest.TestRmi.main(TestRmi.java:36)
0
Comment
Question by:chandu33
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
aviadbd earned 50 total points
ID: 12224052
You might want to use a policy file.

You can place it everywhere, because you use the property -Djava.security.policy when you run the server.  Try using a testing policy at first, such as

http://java.sun.com/j2se/1.4.2/docs/guide/rmi/policy

Good luck!
Aviad.
0
 
LVL 3

Expert Comment

by:aviadbd
ID: 12224056
You have a little more about it here:

http://java.sun.com/j2se/1.4.2/docs/guide/rmi/getstart.doc.html#7445

Aviad.
0
 
LVL 15

Expert Comment

by:babuno5
ID: 12250195
hello
you will find information about policy file and seting permission

http://www.mindprod.com/jgloss/policyfile.html

and also

http://vlibrary.h10.ru/java/BasicJava1/dba.html
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question