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 "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2014/08/04 16:01:24 UTC

[jira] [Created] (DERBY-6685) Permission problems when running JUnit tests with Ant 1.9.4

Knut Anders Hatlen created DERBY-6685:
-----------------------------------------

             Summary: Permission problems when running JUnit tests with Ant 1.9.4
                 Key: DERBY-6685
                 URL: https://issues.apache.org/jira/browse/DERBY-6685
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.11.1.0
            Reporter: Knut Anders Hatlen


I saw many permission problems when I set up a build job for the 10.11 branch. See for example this log: https://builds.apache.org/job/Derby-10.11-suites.All/1/console

First stack trace:

{noformat}
    [junit] Running org.apache.derby.PackagePrivateTestSuite
    [junit] Tests run: 67, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.662 sec
    [junit] Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/jenkins/jenkins-slave/workspace/Derby-10.11-suites.All/10.11-head/junit_20140804_1122/TEST-org.apache.derby.PackagePrivateTestSuite.xml" "write")
    [junit] 	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
    [junit] 	at java.security.AccessController.checkPermission(AccessController.java:884)
    [junit] 	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    [junit] 	at java.lang.SecurityManager.checkWrite(SecurityManager.java:979)
    [junit] 	at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
    [junit] 	at java.io.FileOutputStream.<init>(FileOutputStream.java:156)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement$DelayedFileOutputStream.write(FormatterElement.java:381)
    [junit] 	at java.io.OutputStream.write(OutputStream.java:116)
    [junit] 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    [junit] 	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
    [junit] 	at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
    [junit] 	at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
    [junit] 	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
    [junit] 	at java.io.BufferedWriter.flush(BufferedWriter.java:254)
    [junit] 	at org.apache.tools.ant.util.DOMElementWriter.openElement(DOMElementWriter.java:371)
    [junit] 	at org.apache.tools.ant.util.DOMElementWriter.write(DOMElementWriter.java:209)
    [junit] 	at org.apache.tools.ant.util.DOMElementWriter.write(DOMElementWriter.java:222)
    [junit] 	at org.apache.tools.ant.util.DOMElementWriter.write(DOMElementWriter.java:222)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.endTestSuite(XMLJUnitResultFormatter.java:188)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireEndTestSuite(JUnitTestRunner.java:840)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:575)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1179)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1030)
    [junit] Running org.apache.derby.PackagePrivateTestSuite
    [junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
    [junit] Test org.apache.derby.PackagePrivateTestSuite FAILED (crashed)
{noformat}

I can reproduce these failures in my environment by running the junit-single target with Ant 1.9.4. For example:

{noformat}
ant -Dderby.junit.testclass=org.apache.derbyTesting.unitTests.junit.FormatableBitSetTest junit-single
{noformat}

If I use an older Ant version (I've tried 1.9.0 and 1.8.2) it does not fail.



--
This message was sent by Atlassian JIRA
(v6.2#6252)