Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Java RMI

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

Independent Software Vendors: 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

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…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

610 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