db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spykee <toma.georg...@yahoo.com>
Subject java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
Date Mon, 21 Jul 2014 19:21:10 GMT
Hi folks,

I have a problem and I hope someone can help me.

-  I added a specific jar file in derby, and every time I execute a stored
procedure from that jar I encounter:
-- java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "getClassLoader")

* I searched on internet a solution for this, and the problem reside in the
security policy.
* I don't want to use as an argument a specific security politicy
(-D...=myPolicy) while starting derby (network server).
* I searched my Java policy ( C:\Program Files\Java\jre8\lib\security ) and
I added the followings(java.policy file):

grant codeBase "file://C:/Program Files/Java/jdk1.8.0/db/lib/derby.jar"
{
  permission java.lang.RuntimePermission "createClassLoader";
  permission java.util.PropertyPermission "derby.*", "read";
  permission java.lang.RuntimePermission "getClassLoader";
  permission java.util.PropertyPermission "user.dir", "read";
  permission java.lang.RuntimePermission "setContextClassLoader";
permission java.util.PropertyPermission "derby.*", "read";
  permission java.util.PropertyPermission "derby.storage.jvmInstanceId",
"write";
permission java.io.FilePermission"C:/Users/myUser/.netbeans-derby",
"read,write,delete";
  permission java.io.FilePermission"C:/Users/myUser/.netbeans-derby{/}-",
"read,write,delete";
};

I tried to use the Linux separator (/), the windows one(\) for the file
path... same errors on my Netbeans. I start/stop Apache Derby from Netbeans.

Can someone give me a hint  ?

Cheers,
George



--
View this message in context: http://apache-database.10148.n7.nabble.com/java-security-AccessControlException-access-denied-java-lang-RuntimePermission-getClassLoader-tp140900.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Mime
View raw message