• Post Reply Bookmark Topic Watch Topic
  • New Topic

Activatable tutorial

 
Julie de Wet
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Help - I can't get the tutorial to work. The Setup program works fine but when I try to run the client I get an AccessControlException in the RMID window and an EOFException in the client window.
I think I have tried eveything - anyone care to spell it out for me I would greatly appreciate it.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AccessControlException appears to be a security problem. There should be a message attached to the exception to say why acces is denied.
Do you have a policy file?
Bill
 
Julie de Wet
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I start rmiregistry and then rmid as follows:
rmid -J-Djava.security.policy=rmid.policy
where rmid.policy is as follows:
grant {
permission java.security.AllPermission;
};
I run the setup program which runs without a hitch. When I run the client using the following command
java -Djava.security.policy=policy Client localhost
where policy is identical to rmid.policy. The result is as follows:
Got a remote reference to the object that extends Activateble.
Making remote call to the server
java.rmi.UnmarshalException:Error unmarshalling return header; nested exception is: java.io.EOFException at readByte....etc.
While over in the rmid window there appears a host of exceptions starting with
ExecGroup-0:err:java.security.AccessControlException:access denied (java.net.SocketPermission 192.... accept, resolve)
followed by
ExecGroup-0:err: at java.security.AccessController.checkPermission(AccessControlContext.java:267) etc.
I must admit that I don't know much about policy files and the likes, so I am rather stumped. I can see that others have had similar problems, and have tried all the things suggested as far as I understood them, but with no luck.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!