Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 67149 invoked from network); 7 Apr 2009 16:42:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Apr 2009 16:42:37 -0000 Received: (qmail 3539 invoked by uid 500); 7 Apr 2009 16:42:36 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 3496 invoked by uid 500); 7 Apr 2009 16:42:36 -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 3488 invoked by uid 99); 7 Apr 2009 16:42:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 16:42:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 16:42:34 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 41029234C051 for ; Tue, 7 Apr 2009 09:42:13 -0700 (PDT) Message-ID: <831447998.1239122533265.JavaMail.jira@brutus> Date: Tue, 7 Apr 2009 09:42:13 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4128) Failure in ServerPropertiesTest due to java.security.AccessControlException on the server side, in 10.4 to 10.5.1. soft upgrade mode In-Reply-To: <861989300.1238183810691.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696613#action_12696613 ] Kathey Marsden commented on DERBY-4128: --------------------------------------- Well, I can fix it so that it won't need read permission, just write permission if the trace directory is in user.dir or derby.system.home, because we know they exists, but for other directories, even if they exist, we will have to add the requirement that the user grant read as well as write permission to the trace directory to derbynet.jar. Is this acceptable, or should I just revert back to the old behavior where it only needs write permission and will just fail if the directory does not exist? The downside is that the user will have to create the trace directory themselves instead of Derby doing it for them. > Failure in ServerPropertiesTest due to java.security.AccessControlException on the server side, in 10.4 to 10.5.1. soft upgrade mode > ------------------------------------------------------------------------------------------------------------------------------------ > > Key: DERBY-4128 > URL: https://issues.apache.org/jira/browse/DERBY-4128 > Project: Derby > Issue Type: Bug > Components: Regression Test Failure > Affects Versions: 10.5.1.0 > Environment: Windows Vista 64, Sun JDK 1.6.0_10, Junit 3.8.2 > Reporter: Suran Jayathilaka > Assignee: Kathey Marsden > > Soft upgrade from 10.4.2.0 to 10.5.1.0 (RC1). > This test fails when run under suites.All as well as by itself. > Steps to reproduce > --------------------------- > Steps followed are as follows. > 1. Run setEmbeddedCP.bat from version 10.4.2.0's bin folder > 2. In a test folder run ij > 3. create system/wombat database. > ij> connect 'jdbc:derby:system/wombat;create=true'; > 4. exit ij > 5. Copy the 10.5.1.0 derby jars (from lib folder) and the derbyTesting.jar from 10.4.2.0 to the test folder and set classpath with them (including junit and ORO) > 6. Run test > java -Xmx512M -Xms512M -Dderby.tests.trace=true junit.textui.TestRunner org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest > ------------------------------- > The test failure stack trace is > --------------------------------------- > testToggleTrace(org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest)junit.framework.AssertionFailedError: expected:<0> but was:<1> > at org.apache.derbyTesting.junit.BaseTestCase.assertExecJavaCmdAsExpected(BaseTestCase.java:505) > at org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest.assertSuccessfulCmd(ServerPropertiesTest.java:389) > at org.apache.derbyTesting.functionTests.tests.derbynet.ServerPropertiesTest.testToggleTrace(ServerPropertiesTest.java:586) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:102) > 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) > 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 junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) > at junit.extensions.TestSetup$1.protect(TestSetup.java:21) > at junit.extensions.TestSetup.run(TestSetup.java:25) > The Server's log shows this exception. > ---------------------------------------------------- > 2009-03-27 19:13:54.754 GMT : Apache Derby Network Server - 10.5.1.0 - (757599) started and ready to accept connections on port 1527 > 2009-03-27 19:13:55.475 GMT : access denied (java.io.FilePermission D:\projects\derby-testing\test-10.4-3\system read) > java.security.AccessControlException: access denied (java.io.FilePermission D:\projects\derby-testing\test-10.4-3\system read) > at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) > at java.security.AccessController.checkPermission(AccessController.java:546) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) > at java.lang.SecurityManager.checkRead(SecurityManager.java:871) > at java.io.File.exists(File.java:731) > at java.io.File.mkdirs(File.java:1181) > at org.apache.derby.impl.drda.DssTrace$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source) > at org.apache.derby.impl.drda.Session.initTrace(Unknown Source) > at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source) > at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source) > at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source) > at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source) > at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.