db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vemund Ostgaard <Vemund.Ostga...@Sun.COM>
Subject java.lang.RuntimePermission getProtectionDomain in derbynet/sysinfo.java
Date Wed, 12 Apr 2006 12:01:09 GMT
The following two tests have been failing when I have run 
derbynetclientmats:

derbynetclientmats/derbynetmats/derbynetmats.fail:derbynet/sysinfo.java
derbynetclientmats/derbynetmats/derbynetmats.fail:derbynet/sysinfo_withproperties.java

The reason is that the test fails to get the permission for doing 
getProtectionDomain().getCodeSource() on class com.ibm.db2.jcc.DB2Driver:

--------- Derby Information --------
JRE - JDBC: J2SE 5.0 - JDBC 3.0
[/export/home/tmp/jagtmp/vo136787derbynetclientmats/install/lib/derby.jar] 
10.2.0.0 alpha - (392791)
[/export/home/tmp/jagtmp/vo136787derbynetclientmats/install/lib/derbyclient.jar] 
10.2.0.0 alpha - (392791)
[/export/home/tmp/jagtmp/vo136787derbynetclientmats/install/lib/derbynet.jar] 
10.2.0.0 alpha - (392791)
[/export/home/tmp/jagtmp/vo136787derbynetclientmats/install/lib/derbytools.jar] 
10.2.0.0 alpha - (392791)
[Unable to access Protection Domain or Code Source for class class 
com.ibm.db2.jcc.DB2Driver: access denied (java.lang.RuntimePermission 
getProtectionDomain)] 2.4 - (17)
[/export/home/tmp/jagtmp/vo136787derbynetclientmats/install/lib/db2jcc_license_c.jar] 
2.4 - (17)


After quite a bit of reading and testing it seems to me that the tests 
fail when db2jcc.jar is located in the same directory as the derby*.jar 
files, if I move it to a different directory the tests succeed. So, I am 
wondering, should the tests run ok also when db2jcc.jar is in the same 
directory as the derby jars? Is there a rule that these files should be 
put somewhere else?

I am a bit surprised about the behaviour/configuration of the 
securitymanager in these networkclient tests, though I don't know much 
about it. I am allowed to know that a driver was loaded from a jar file 
in a different directory but not that it was loaded from a copy of the 
same jar file in the same directory?  Anyone know why this is?

Vemund


Mime
View raw message