The Artima Developer Community
Sponsored Link

Java Answers Forum
Exception in rmi based chat

1 reply on 1 page. Most recent reply: Apr 5, 2004 8:43 AM by Alex Blewitt

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
jainendra

Posts: 1
Nickname: jainendra
Registered: Apr, 2004

Exception in rmi based chat Posted: Apr 3, 2004 6:05 AM
Reply to this message Reply
Advertisement
Hi,
As we have made a rmi based chat.When we are running it in our Local Environment it works fine.But when we port the whole application as it is on our Web Server.It gives following Exception
java.security.AccessControlException access denied(<ip of webserver:3494>.
The port always varies.
plz suggest me the solution


Alex Blewitt

Posts: 44
Nickname: alblue
Registered: Apr, 2003

Re: Exception in rmi based chat Posted: Apr 5, 2004 8:43 AM
Reply to this message Reply
This is a security access exception, which you'll get if you don't have the security policy set up to allow outbound connections to other machines.

You'll need to have a java.policy file that contains something like:
grant signedBy "YouInc" {
permission java.net.SocketPermission "ipofwebserver:1024-", "connect";
};

(alternatively, you could have an unsigned client)

grant codeBase "file:/home/rmiclient/rmiclient.jar" {
permission java.net.SocketPermission "ipofwebserver:1024-", "connect";
};

See the policy specifications document for more information:
http://java.sun.com/j2se/1.4.2/docs/guide/security/permissions.html

Flat View: This topic has 1 reply on 1 page
Topic: The TimeZone Class Previous Topic   Next Topic Topic: listing file locations from web page

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use