db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bradm6406 <bradm6...@hotmail.com>
Subject Re: java.security.AccessControlException doing a file write
Date Fri, 15 Feb 2008 21:56:37 GMT

Okay, I just tried one more thing and it worked... sort of.

I changed the policy file to this:

grant {
  permission java.security.AllPermission;
};

And now the zip file gets created properly.  I would have thought that
giving AllPermission to the entire lib directory that contained my Derby jar
files and my custom jar file, as well as giving AllPermission to the entire
lib directory of the jre that I am using would have been equivalent to what
I just tried.  But apparently there is some difference that I'm not
understanding.

The above policy file works, but obviously I don't want to grant all
permissions to everything.  Can anyone give me some guidance as to how to
change my policy file to just give the appropriate permissions that I need
to create files from my custom jar?


Thanks,

Brad


bradm6406 wrote:
> 
> That didn't work.  I still got the same error.  So I decided to try
> creating a new policy file that gave all permissions to everything and see
> what happened.  My new policy file looks like this:
> 
> // Give permissions to all of my Derby jar files, and my custom jar file
> grant codeBase "file:${derby.system.home}/lib/-" {
>   permission java.security.AllPermission;
> };
> 
> // I have a copy of the Sun JRE in d:\derby\database\java\ that I am
> using, give all permissions to all of the java libraries
> grant codeBase "file:D:/derby_database/java/lib/-"{
>   permission java.security.AllPermission;
> };
> 

-- 
View this message in context: http://www.nabble.com/java.security.AccessControlException-doing-a-file-write-tp15510576p15510956.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message