db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olk <Oliver.Koll...@web.de>
Subject Re: java.security.AccessControlException: access denied (java.io.FilePermission derby.log read)
Date Thu, 20 Dec 2007 16:19:25 GMT

Hi,

thanks for your reply.

I finally found the reason for that behavior .....well, that's what I think
.... :o)

After consulting countless forums and discussions I got some hints that this
is related to the java security manager. It looks like, there is a security
manager created, for each jar that is used by the applet. That means for
mycode.jar and for the derby.jar we have two security manager. Both are
working with different signatures, as I have not signed the derby.jar with
my signature. The stupid thing is, that the browser just asked to accept the
signature of mycode.jar.

One easy workaround is using a "System.setSecurityManager(null);" before
trying to open the connection. 

I found this not very clean - especially because I don't exactly know what
else this command does. I found some comments, that this might open the door
for other applets running in the same browser ( ... I did not try that yet
...so I cannot confirm.... maybe if I'll get some free time...)

Anyway the solution was easy after all - I just signed all the jars with the
same signature, which then let me open the connection without the
AccessControlException.

If someone finds a good documentation about this topic, ....pleeeease post
it here, I rather prefer to learn things by reading than by trial and
error...... :o)



-- 
View this message in context: http://www.nabble.com/java.security.AccessControlException%3A-access-denied-%28java.io.FilePermission-derby.log-read%29-tp13225812p14439550.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message