db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1785) junit tests fail with permission access problems when run with j9 jvms
Date Thu, 05 Oct 2006 17:22:20 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1785?page=comments#action_12440184 ] 
            
Myrna van Lunteren commented on DERBY-1785:
-------------------------------------------

I'm assigning this to me because I keep forgetting the number. If someone else feels interest,
be welcome to take it away. 

In the mean time, I have tried to find out what is wrong with this and I've been unsuccessful
so far.
In DERBY-855 Dan stated that he had found a problem with the security manager and had reported
this to IBM. I checked on the status of that problem; it is fixed in the follow-up release
of wctme5.7_foundation (called weme6.1, which is based on jdkj2ME specification 1.1). I tested
with that product and indeed the problem Dan saw has been fixed...

However, I still see the access permission problems with junit with that version.
I will continue to investigate. I think this is an important detail - we have said we're supporting
JSR169, yet it appears the only check we have are our test runs with "j9" foundation. If someone
else is running JSR169 tests, I hope they'll announce it.

The problem needs to be better identified, and possibly a fix needs to be arranged.

As a workaround there are 2 approaches:
 - ignore the failing tests. This basically means skipping every junit test. We can do this
for each test as it gets morphed into a junit test, which means a ridiculous maintenance task,
or in the test harness. But this would hollow out the testing for JSR169 support.
- make the junit tests not run with security manager if the jvm is j9. This seems fairly ugly

(third option I thought maybe a separate policy file could be made, but judging from the error,
it isn't having the permissions to read the policy file, so I'm not sure that will work.)


> junit tests fail with permission access problems when run with j9 jvms
> ----------------------------------------------------------------------
>
>                 Key: DERBY-1785
>                 URL: http://issues.apache.org/jira/browse/DERBY-1785
>             Project: Derby
>          Issue Type: Test
>          Components: Test, Regression Test Failure
>    Affects Versions: 10.2.1.6, 10.3.0.0
>         Environment: using ibm's j9 jvm as available with wssd5.6 or wctme5.7 (jcl:Max
or jcl:foundation configuration)
>            Reporter: Myrna van Lunteren
>         Assigned To: Myrna van Lunteren
>            Priority: Minor
>             Fix For: 10.2.2.0, 10.3.0.0
>
>
> The junit tests have been made to run with security manager.
> Until now, using the org.apache.derbyTesting.functionTests.harness classes, there was
exception logic that stopped the j9 jvms from running with security manager, but that's now
changed for the junit tests.
> For instance, the test store/bootAllTest.junit fails with the following error:
> There was 1 error:
> 1) testSettingBootAllPropertyWithHomePropertySet(org.apache.derbyTesting.functionTests.tests.store.BootAllTest)java.security.AccessControlException:
Access denied (java.util.PropertyPermission framework read)
> 	at java.security.AccessController.checkPermission(AccessController.java:74)
> 	at java.lang.SecurityManager.checkPermission(SecurityManager.java:612)
> 	at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:366)
> 	at java.lang.System.getProperty(System.java:319)
> 	at java.lang.System.getProperty(System.java:301)
> 	at org.apache.derbyTesting.functionTests.util.TestUtil$1.run(TestUtil.java:177)
> 	at java.security.AccessController.doPrivileged(AccessController.java:147)
> 	at org.apache.derbyTesting.functionTests.util.TestUtil.getFramework(TestUtil.java:174)
> 	at org.apache.derbyTesting.functionTests.util.TestUtil.getDataSourcePrefix(TestUtil.java:391)
> 	at org.apache.derbyTesting.functionTests.util.TestUtil.getSimpleDataSource(TestUtil.java:330)
> 	at org.apache.derbyTesting.functionTests.util.TestUtil.getDataSource(TestUtil.java:324)
> 	at org.apache.derbyTesting.functionTests.util.TestDataSourceFactory.getDataSource(TestDataSourceFactory.java:47)
> 	at org.apache.derbyTesting.junit.TestConfiguration.openConnection(TestConfiguration.java:296)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.openConnection(BaseJDBCTestCase.java:197)
> 	at org.apache.derbyTesting.functionTests.tests.store.BootAllTest.setUp(BootAllTest.java:58)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:76)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message