db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject SecurityManager question
Date Wed, 08 Feb 2006 21:03:40 GMT
I am tracking down a problem with autoloading jdbc drivers when running 
from jar files under the Derby test harness on jdk1.6. Capsule summary:

SUCCESS-1 The drivers correctly autoload (from the information in the 
jar file) when I run my test program standalone (without a SecurityManager)

SUCCESS-2 The drivers also correctly autoload if I run the test under 
the Derby test harness but disable the SecurityManager

FAILURE  However, the drivers fail to autoload when I run my test 
program under the default Derby test harness (which sets up a 
SecurityManager)

The vm silently swallows the failure. When I run these test cases with 
the the java -verbose flag, I see the following:

o For the success cases, the autoloading of the driver is logged.

o For the failure (Derby test harness) case, around the same place in 
the log, I see AccessControlException being loaded. This is never loaded 
in the success cases.

So I seem to have some kind of SecurityManager issue here. But what? 
Later on in the failure case, I successfully load the driver using 
Class.forName(). What is different in the Derby harness security 
environment between autoload time and Class.forName() time? How can I 
instrument vm startup to tease open the swallowed 
AccessControlException? Would appreciate any advice you may have.

Thanks,
-Rick

Mime
View raw message