Dag H. Wanvik created DERBY-6655:
------------------------------------
Summary: Missing FilePermission makes boot fail with NPE
Key: DERBY-6655
URL: https://issues.apache.org/jira/browse/DERBY-6655
Project: Derby
Issue Type: Bug
Components: Services
Reporter: Dag H. Wanvik
Attachments: derby-6617-2.diff
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:
{code}
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)
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)