RMI - activatable - policy - access denied -127.0.0.1:1098

Mermerus <[email protected]> Tue, 27 Feb 2007 04:16:34 -0700
Newsgroups gmane.comp.java.sun.rmi
Message-ID <LISTSERV%[email protected]>
hello i have this issued when running the command:
N:\>java -classpath N:\examples\mysrc
com.deitel.messenger.rmi.server.ChatServerAdministrator start
-Djava.security.policy=file:///n:\\examples\\mysrc\\administrator.policy
-Djava.rmi.server.codebase=file:///N:\\examples\\mysrc\\

I get :
--------------
Exception in thread "main" java.rmi.activation.ActivationException: unable to ob
tain ActivationSystem; nested exception is:
        java.security.AccessControlException: access denied (java.net.SocketPerm
ission 127.0.0.1:1098 connect,resolve)
        at java.rmi.activation.ActivationGroup.getSystem(Unknown Source)
        at com.deitel.messenger.rmi.server.ChatServerAdministrator.startServer(C
hatServerAdministrator.java:30)
        at com.deitel.messenger.rmi.server.ChatServerAdministrator.main(ChatServ
erAdministrator.java:92)
Caused by: java.security.AccessControlException: access denied (java.net.SocketP
ermission 127.0.0.1:1098 connect,resolve)
        at java.security.AccessControlContext.checkPermission(Unknown Source)
        at java.security.AccessController.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkConnect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)

etc.....
--------------

the policy files:

administrator.policy:
-----------------------
// allow ChatServerAdministrator to connect to
// activation daemon
grant {
   permission java.net.SocketPermission "localhost:1024-","listen";
   permission java.net.SocketPermission "localhost:1024-","connect";
   permission java.net.SocketPermission "localhost:1024-","resolve";
   permission java.lang.RuntimePermission "setFactory";
};

also i run the rmid command like this:

N:\>rmid -J-Djava.security.policy=file:///n:\\examples\\mysrc\\rmid.policy

rmid.policy:
--------------
grant {
   permission com.sun.rmi.rmid.ExecOptionPermission

"-Djava.security.policy=file:///N:\\examples\\mysrc\\activationGroup.policy";
};

ActivationGroup.policy
-----------------------

// allow ActivationGroup to terminate the virtual machine
grant {
    permission java.lang.RuntimePermission "exitVM";
};

----------------------------------------------

also i can run the
http://java.sun.com/j2se/1.4.2/docs/guide/rmi/activation/activation.1.html
examples.

please help!
I am in this loop for a few days now and cant resolve the problem.

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html