This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes java.security.AccessControlException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "java.security.AccessControlException" Watch "java.security.AccessControlException" New topic
Author

java.security.AccessControlException

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Hi ALL,

I have a query REG: java.policy File

I developed a java bean that will download a file from the application server to client machine. Some time back the code works fine and now am getting java.security.AccessControlException: access denied (java.net.SocketPermission 202.55555.0.44:7022 connect,resolve)

I started googling and I got some replys saying that some permissions were missing in java.policy File.
Could some one please assist me to resolve this issue.

Thanks in advance
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42038
    
  64
What kind of environment does this code run in? There must be a SecurityManager involved that enforces a policy. The first step would be to find out which policy that is, and whether it's possible to change it.


Ping & DNS - my free Android networking tools app
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Thanks Ulf Dittmer,

Oracle forms were calling the Java bean using VBean Class. And the Java bean is downloading the files from application server
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42038
    
  64
OK, so there's an application server. You need to find out which security policy it uses; maybe the system administrator can help with that.
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
But the same file from the same client machine can be able to access through browser. But Java bean is failing(AccessControlException )

Also I just checked with DBA team and system Admin. They were helpless to me
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Any suggestions please
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42038
    
  64
I'm unsure now if this is a client problem or a server problem?

Whatever JVM is the origin of this problem is running under a SecurityManager. Most likely that is set as a parameter at JVM startup. So you need to find out which command is used to start the JVM. If the sys admin can't do that, then nobody can, which I think is unlikely.

If it really is happening in the app server, check its documentation for references to security managers and security policies.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Meet Gaurav wrote:Any suggestions please

I can remember saying to you that Patience Is A Virtue.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
GeeCON Prague 2014
 
subject: java.security.AccessControlException