?
Solved

Java RMI

Posted on 2004-10-04
5
Medium Priority
?
251 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 200 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

Industry Leaders: 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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 1 hour left to enroll

765 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