Solved

Java RMI

Posted on 2004-10-04
5
233 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
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
aviadbd earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now