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 Kathey Marsden <km...@sbcglobal.net> on 2007/03/07 23:51:06 UTC
Re: Question about JDBCHarnessJavaTest
Kathey Marsden wrote:
>
> When adding (really uncommenting) tests in JDBCHarnessJavaTest, I am
> seeing an
> AccessControlException: access denied exception.
>
On Dan's suggestion, I tried running the test outside of eclipse and got
the same result.
I also tried to make derby_tests.policy more liberal to no avail. Any
other thoughts on this are welcome.
Thanks
Kathey
> Is there some change I need to make to the test before enabling them
> in the adapter? For example I reduced setTransactionIsolation to a
> single master and tried running it and got.
>
> java.security.AccessControlException: access denied
> (java.io.FilePermission C:\svn\trunk read)
>
> at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java(Compiled
> Code))
>
> at
> java.security.AccessController.checkPermission(AccessController.java(Compiled
> Code))
>
> at
> java.lang.SecurityManager.checkPermission(SecurityManager.java(Compiled
> Code))
>
> at
> java.lang.SecurityManager.checkRead(SecurityManager.java(Compiled Code))
>
> at java.io.File.exists(File.java(Compiled Code))
>
> at java.io.File.mkdirs(File.java:1146)
>
> at java.io.File.mkdirs(File.java:1159)
>
> at java.io.File.mkdirs(File.java:1159)
>
> at java.io.File.mkdirs(File.java:1159)
>
> at java.io.File.mkdirs(File.java:1159)
>
> at
> org.apache.derbyTesting.junit.TestConfiguration$4.run(TestConfiguration.java:971)
>
>
> at java.security.AccessController.doPrivileged1(Native Method)
>
> at
> java.security.AccessController.doPrivileged(AccessController.java(Compiled
> Code))
>
> at
> org.apache.derbyTesting.junit.TestConfiguration.getFailureFolder(TestConfiguration.java:965)
>
>
> at
> org.apache.derbyTesting.junit.BaseTestCase.getFailureFolder(BaseTestCase.java(Inlined
> Compiled Code))
>
> at
> org.apache.derbyTesting.functionTests.util.CanonTestCase.dumpForFail(CanonTestCase.java(Inlined
> Compiled Code))
>
> at
> org.apache.derbyTesting.functionTests.util.CanonTestCase.compareCanon(CanonTestCase.java(Compiled
> Code))
>
> at
> org.apache.derbyTesting.functionTests.util.HarnessJavaTest.runTest(HarnessJavaTest.java:90)
>
>
> at junit.framework.TestCase.runBare(TestCase.java:127)
>
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:76)
>
> at junit.framework.TestResult$1.protect(TestResult.java:106)
>
> at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>
> at junit.framework.TestResult.run(TestResult.java:109)
>
> at junit.framework.TestCase.run(TestCase.java:118)
>
> at
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>
> at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>
> at junit.extensions.TestSetup.run(TestSetup.java:23)
>
> at
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>
> at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>
> at junit.extensions.TestSetup.run(TestSetup.java:23)
>
> at
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>
> at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>
> at junit.extensions.TestSetup.run(TestSetup.java:23)
>
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
>
> at junit.framework.TestSuite.run(TestSuite.java:203)
>
> at
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>
> at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>
> at junit.extensions.TestSetup.run(TestSetup.java:23)
>
> at
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>
> at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>
> at junit.extensions.TestSetup.run(TestSetup.java:23)
>
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
>
> at junit.framework.TestSuite.run(TestSuite.java:203)
>
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
>
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
>
>
>
>
>
>
Re: Question about JDBCHarnessJavaTest
Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Kathey Marsden <km...@sbcglobal.net> writes:
> Kathey Marsden wrote:
>>
>> When adding (really uncommenting) tests in JDBCHarnessJavaTest, I am
>> seeing an
>> AccessControlException: access denied exception.
>>
> On Dan's suggestion, I tried running the test outside of eclipse and
> got the same result.
> I also tried to make derby_tests.policy more liberal to no avail. Any
> other thoughts on this are welcome.
I don't see this exception when I enable setTransactionIsolation in
JDBCHarnessJavaTest (Java 1.5.0, Solaris 10, testing both jars and
classes), so it might be something special with your environment.
Note that the exception is thrown
>> at
>> org.apache.derbyTesting.functionTests.util.CanonTestCase.dumpForFail(CanonTestCase.java(Inlined Compiled Code))
meaning that the AccessControlException is caused by the code which
tries to log the output from a failed test. I would guess that the
exception will go away if you update the canon to match the actual
output. In the old harness, the output from setTransactionIsolation
went through a sed script which filtered out cursor names and some
less interesting parts of the run-time statistics. Without the sed
filtering, I think there will be many differences between the embedded
driver and the client driver.
--
Knut Anders