Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Repro attached
Description
In experimenting with DERBY-6617, I looked at the "false" returned by FileMonitor#PBInitialize, ca line 157 when the code gets a SecurityException when trying to create the derby home directory. This will happen when running with a security manager and the necessary FilePermission has not been granted to derby.jar.
Unfortunately, this leads to the boot failing with an NPE without explanation of the cause. [The repro patch does dump the reason to the console.]
See the repro in the attached patch derby-6617-2.diff.
This is the stack trace seen:
1) testMissingFilePermission(org.apache.derbyTesting.unitTests.junit.MissingPermissionsTest)java.lang.NullPointerException at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:147) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:208) at org.apache.derbyTesting.junit.DriverManagerConnector.openConnection(DriverManagerConnector.java:101) at org.apache.derbyTesting.junit.DriverManagerConnector.openConnection(DriverManagerConnector.java:68) at org.apache.derbyTesting.junit.DriverManagerConnector.openConnection(DriverManagerConnector.java:52) at org.apache.derbyTesting.junit.TestConfiguration.openDefaultConnection(TestConfiguration.java:1654) at org.apache.derbyTesting.junit.BaseJDBCTestCase.openDefaultConnection(BaseJDBCTestCase.java:553) at org.apache.derbyTesting.unitTests.junit.MissingPermissionsTest.testMissingFilePermission(MissingPermissionsTest.java:178)
Attachments
Attachments
Issue Links
- is related to
-
DERBY-6617 Silently swallowed SecurityExceptions may disable Derby features, including security features.
- Closed