You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2014/07/09 23:07:05 UTC
[jira] [Created] (DERBY-6655) Missing FilePermission makes boot
fail with NPE
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)