Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 58487 invoked from network); 9 Jul 2007 07:09:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2007 07:09:31 -0000 Received: (qmail 49185 invoked by uid 500); 9 Jul 2007 07:09:25 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 48951 invoked by uid 500); 9 Jul 2007 07:09:23 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 48930 invoked by uid 99); 9 Jul 2007 07:09:23 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 00:09:23 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of sean.xx.qiu@gmail.com designates 209.85.132.249 as permitted sender) Received: from [209.85.132.249] (HELO an-out-0708.google.com) (209.85.132.249) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 00:09:17 -0700 Received: by an-out-0708.google.com with SMTP id c8so172194ana for ; Mon, 09 Jul 2007 00:08:57 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=hv9/3M6VHMRcDXGtKnPhC5gYoYOiQDscxBgEhWSaSLsKdzb6lwnjMwsBrPenLJ+YO+QOdlytOqnV47SFDR5KK8LCIkqlSBTyFzOeySoLoMH0kFvk89xbsNR7GNxLW21CLHBiEoCu+WFLT379fTFdAtOBf1FNc5WOi9oeyU0fpY0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=icu0GzhjxzyWGl0dcp6m520pW9CDyBAnXRRRCUvNv+I2jAhSSvafr5mYgGEBCr5KnUyxcjwIXSW4GPDYpEFwqLfolfZsGLTTcFTRaUF24ViSBivSHh9RP8PrIEVyMXeFpIvrrydTh31BKTW2Vi3JkJyzxUp/v/A5FCe/B8xR1lc= Received: by 10.100.125.5 with SMTP id x5mr1441121anc.1183964936697; Mon, 09 Jul 2007 00:08:56 -0700 (PDT) Received: by 10.100.144.16 with HTTP; Mon, 9 Jul 2007 00:08:56 -0700 (PDT) Message-ID: <94d710af0707090008o13e66e72kc8587e188f1fdb6a@mail.gmail.com> Date: Mon, 9 Jul 2007 15:08:56 +0800 From: "Sean Qiu" To: derby-dev@db.apache.org Subject: [test] Junit test fail and throw AccessControlException MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_189886_13936359.1183964936672" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_189886_13936359.1183964936672 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,guys I build the derby source code successfully, and then run the junit test with "ant juni-core", but It will fail and throw AccessControlException[1]. SecurityManagerSetup will install a SecurityManager with policy file of org/apache/derbyTesting/functionTests/util/derby_tests.policy. Won't this policy file grant the code propor permission? or am i missing some thing? [1] Test failure message [junit] Running org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadTest [junit] Exception in thread "main" java.security.AccessControlException: Access denied (java.io.FilePermission D:\at\derby\jun itvmwatcher954993545.properties write) [junit] at java.security.AccessController46checkPermission( AccessController.java:103) [junit] at java.lang.SecurityManager46checkPermission( SecurityManager.java:532) [junit] at java.lang.SecurityManager46checkWrite( SecurityManager.java:962) [junit] at java.io.FileOutputStream46(FileOutputStream.java :169) [junit] at java.io.FileOutputStream46(FileOutputStream.java :70) [junit] at java.io.FileWriter46(FileWriter.java:46) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner46registerTestCase (JUnitTestRunner.java:940) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner46access$000( JUnitTestRunner.java:68) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$346startTest( JUnitTestRunner.java:807) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$446startTest( JUnitTestRunner.java:1005) Thanks. -- Sean Qiu ------=_Part_189886_13936359.1183964936672 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi,guys

I build the derby source code successfully, and then run the junit test with "ant juni-core", but It will fail and throw AccessControlException[1].
 
SecurityManagerSetup will install a SecurityManager with policy file of org/apache/derbyTesting/functionTests/util/derby_tests.policy.
Won't this policy file grant the code propor permission? or am i missing some thing?
 
 
[1] Test failure message
    [junit] Running org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadTest
    [junit] Exception in thread "main" java.security.AccessControlException: Access denied (java.io.FilePermission D:\at\derby\jun
itvmwatcher954993545.properties write)
    [junit]     at java.security.AccessController46checkPermission(AccessController.java:103)
    [junit]     at java.lang.SecurityManager46checkPermission(SecurityManager.java :532)
    [junit]     at java.lang.SecurityManager46checkWrite(SecurityManager.java:962)
    [junit]     at java.io.FileOutputStream46<init>(FileOutputStream.java:169)
    [junit]     at java.io.FileOutputStream46 <init>(FileOutputStream.java:70)
    [junit]     at java.io.FileWriter46<init>(FileWriter.java:46)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner46registerTestCase(JUnitTestRunner.java :940)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner46access$000(JUnitTestRunner.java:68)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$346startTest (JUnitTestRunner.java:807)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$446startTest(JUnitTestRunner.java:1005)
 
Thanks.
--
Sean Qiu
------=_Part_189886_13936359.1183964936672--