db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirmal Fernando <nirmal070...@gmail.com>
Subject Re: Additional Permission request to PlanExporter tool's tests
Date Sun, 11 Jul 2010 13:44:11 GMT
Hi Knut,

Possibly that's the reason, I haven't used any doPrivileged blocks in
my code :(.

Here's the stack trace:

(org.apache.derbyTesting.functionTests.tests.lang.XplainStatisticsTest)java.security.AccessControlException:
access denied (java.io.FilePermission
C:\OtherNirmal\GSoC\Testing\Derby4587-Tests\test-7.7\extinout\98614267-0129-c2b1-c2c5-ffffc4f6138e.xml
write)
	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.checkWrite(Unknown Source)
	at java.io.FileOutputStream.<init>(Unknown Source)
	at java.io.FileOutputStream.<init>(Unknown Source)
	at org.apache.derby.impl.tools.planexporter.CreateXMLFile.writeTheXMLFile(CreateXMLFile.java:52)
	at org.apache.derbyTesting.functionTests.tests.lang.XplainStatisticsTest.disableXplainStyle(XplainStatisticsTest.java:536)
	at org.apache.derbyTesting.functionTests.tests.lang.XplainStatisticsTest.testSimpleQuery(XplainStatisticsTest.java:735)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
	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)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)

Thanks.

On Sun, Jul 11, 2010 at 7:01 PM, Knut Anders Hatlen
<knut.hatlen@oracle.com> wrote:
> Kathey Marsden <kmarsdenderby@sbcglobal.net> writes:
>
>>  On 7/10/2010 4:24 AM, Nirmal Fernando wrote:
>>> Hi All,
>>>
>>> In order to run the tests I've created in XplainStatisticsTest.java class,
>>> I need read and write permissions to user's testing directory's
>>> extinout folder.
>>>
>>> Currently in derby_tests.policy file, it doesn't provide IO permissions to
>>> extinout folder under user's testing directory.
>>>
>>> So I like to request from the community to approve the above mentioned
>>> permission grant.
>>>
>> It is interesting to me that it is junit.jar that needs the
>> permission.  I would have expected it to be derbytools.jar or
>> derbyTesting.jar.
>
> That would have been my expectation too. Nirmal, do you have the stack
> trace for the permissions error? That could give us a clue as to whether
> there's a missing doPrivileged block somewhere in the code.
>
> --
> Knut Anders
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Mime
View raw message