Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AccessControlException exception in Applet

1 view
Skip to first unread message

Tim

unread,
Jan 31, 2002, 11:26:59 AM1/31/02
to

I get an AccessControlException when I attempt to get the intial context inside
an applet. Here is the code:

// Get an InitialContext
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
String server = "t3://Localhost:7001";
h.put(Context.PROVIDER_URL, server);

return new InitialContext(h);

I understand that I need to update my policy file. However, it looks as if the
SocketPermission on the server is set to "connect,accept,listen,resolve". Any
help would be appreciated! Here is the stack trace:


java.security.AccessControlException: access denied (java.net.SocketPermission
tim_w2k resolve)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1042)

Tim

unread,
Feb 1, 2002, 9:23:56 AM2/1/02
to

I got past this error only to get the following error:

java.lang.ExceptionInInitializerError: java.security.Acc
ess denied (java.util.PropertyPermission * read,write)

0 new messages