Knut Anders Hatlen created DERBY-6625:
-----------------------------------------
Summary: Many permission related test failures on Java 8 compact2
Key: DERBY-6625
URL: https://issues.apache.org/jira/browse/DERBY-6625
Project: Derby
Issue Type: Bug
Components: Test
Affects Versions: 10.11.0.0
Environment: java version "1.8.0_05"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_05-b13, profile compact2,
headless)
Java HotSpot(TM) Embedded Minimal VM (build 25.5-b02, mixed mode)
Reporter: Knut Anders Hatlen
When I try to run tests on Java SE 8 compact profile 2 with head of trunk, I
see lots of permission related errors. If I add the flag
-Djava.security.policy=<NONE> to disable the security manager, the errors seem
to go away.
For example, if I try to run lang.XMLBindingTest, I see this error:
{noformat}
1) XMLBindingTestjava.sql.SQLException: Java exception: 'access denied
("java.util.PropertyPermission" "user.dir" "read"):
java.security.AccessControlException'.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:107)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:133)
at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:255)
at org.apache.derby.impl.jdbc.Util.javaException(Util.java:277)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:437)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2396)
at
org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:660)
at
org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(InternalDriver.java:647)
at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:301)
at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:932)
at
org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:147)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
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:44)
at
org.apache.derbyTesting.junit.TestConfiguration.openDefaultConnection(TestConfiguration.java:1680)
at
org.apache.derbyTesting.junit.BaseJDBCTestSetup.getConnection(BaseJDBCTestSetup.java:72)
at
org.apache.derbyTesting.functionTests.tests.lang.XMLBindingTest$XBindTestSetup.setUp(XMLBindingTest.java:293)
at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at
org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
Caused by: ERROR XJ001: Java exception: 'access denied
("java.util.PropertyPermission" "user.dir" "read"):
java.security.AccessControlException'.
at
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java:162)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:74)
... 36 more
Caused by: java.security.AccessControlException: access denied
("java.util.PropertyPermission" "user.dir" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.io.UnixFileSystem.resolve(Unknown Source)
at java.io.File.getCanonicalPath(Unknown Source)
at
org.apache.derby.impl.io.DirStorageFactory.doInit(DirStorageFactory.java:190)
at
org.apache.derby.impl.io.BaseStorageFactory.init(BaseStorageFactory.java:88)
at
org.apache.derby.impl.io.DirStorageFactory.init(DirStorageFactory.java:39)
at
org.apache.derby.impl.services.monitor.StorageFactoryService.privGetStorageFactoryInstance(StorageFactoryService.java:215)
at
org.apache.derby.impl.services.monitor.StorageFactoryService.access$400(StorageFactoryService.java:71)
at
org.apache.derby.impl.services.monitor.StorageFactoryService$12.run(StorageFactoryService.java:958)
at
org.apache.derby.impl.services.monitor.StorageFactoryService$12.run(StorageFactoryService.java:954)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.derby.impl.services.monitor.StorageFactoryService.getCanonicalServiceName(StorageFactoryService.java:952)
at
org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(BaseMonitor.java:1504)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(BaseMonitor.java:963)
at
org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Monitor.java:546)
at
org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:2802)
at
org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:405)
... 29 more
{noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)