Solved

Java RMI

Posted on 2004-10-04
5
244 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 241
Desingning Refactoring existing code 2 32
Selenium docs api java index 3 69
Coding for the first time 9 70
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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 learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

730 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