Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AccessControlException Answer


  • From: mmarx@xxxxxxx (Marx, Mitchell E (Mitch), ALSVC)
  • Subject: AccessControlException Answer
  • Date: Fri, 27 Oct 2000 18:12:54 -0400

This seems to go away when the codebase is specified.

Mitchell Evan Marx        mmarx@xxxxxxx

-----Original Message-----
From: Ted Neward [mailto:ted@xxxxxxxxxx]
Sent: Saturday, October 21, 2000 12:09 AM
To: Marx, Mitchell E (Mitch), ALSVC; Advanced-Java@Xcf. Berkeley. Edu
Subject: Re: AccessControlException Question


You get a SecurityException when the ProtectionDomain for your Code doesn't
contain an appropriate SocketPermission that implies the "connect,resolve"
permission; you can see that in the stack trace below. Possible causes for
this would be:

1) The java.policy file changed inside the plugin; I can't say that I know
where the Plugin gets its Policy information from, but I have to assume
there's a java.policy file somewhere in the installation. Check that to see
if code coming from that server's codebase (that is, "http://myserver/*"; or
"http://myserver/prduct/*";, wherever the applet's code is coming from) has a
SocketPermission granted to it.
2) It's possible that the introduction of a firewall into the production
environment would cause such an error, but I don't think you'd be getting a
SecurityException; instead, you'd be getting it, I would think, when
attempting to connect back to the server directly. I bring this up because
I'm not sure where, when an applet comes from a firewalled server, the
applet thinks it came *from*--that's important to the security policy of the
applet environment. Applets are only allowed to contact the machine they
were downloaded from.

I wish I could be of more help; if you figure it out, post to the list, so
it gets stored in the archives for all eternity. :-)

Ted Neward
Java Instructor, DevelopMentor (http://www.develop.com)
http://www.javageeks.com/~tneward


-----Original Message-----
From: Marx, Mitchell E (Mitch), ALSVC <mmarx@xxxxxxx>
To: Advanced-Java@Xcf. Berkeley. Edu <advanced-java@xxxxxxxxxxxxxxxx>
Date: Wednesday, October 18, 2000 2:04 PM
Subject: AccessControlException Question


>
>We use applet to servlet communication over http.  All of a sudden we are
>getting the following error connecting from Netscape/Java Plug In 1.2.2 to
>our WebLogic 5.1 back end.  The strange thing is: we don't know what
>changed, and our development area works, just not the installed version in
>test.
>
>The jar is downloaded from /product/jar_act.html and the servlet is
>/servlet/ConnServlet
>Any ideas?
>
>(Names below changed to protect the innocent)
>
>Opening http://myserver:7001/servlet/ConnServlet no proxy
>java.security.AccessControlException: access denied
>(java.net.SocketPermission myserver:7001 connect,resolve)
>at java.security.AccessControlContext.checkPermission(Unknown Source)
>at java.lang.Exception.(Unknown Source)
>at java.lang.RuntimeException.(Unknown Source)
>at java.lang.SecurityException.(Unknown Source)
>at java.security.AccessControlException.(Unknown Source)
>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 sun.plugin.protocol.jdk12.http.HttpURLConnection.connect(Unknown Source)
>at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
>Source)
>at client.ServerConn.(Transaction.java:606)
>at client.Transaction.requestResponse(Transaction.java, Compiled Code)
>at client.Transaction.invoke(Transaction.java:142)
>at client.Transaction.invoke(Transaction.java:155)
>at DoTransDialog.doTransaction(DoTransDialog.java:60)
>at TransactionDialog$2.run(TransactionDialog.java:146)
>at java.lang.Thread.run(Unknown Source)
>
>Mitchell Evan Marx        mmarx@xxxxxxx
>
>---
>To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
>To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx

---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx