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 2013/07/12 12:09:49 UTC

[jira] [Created] (DERBY-6295) Allow tests to show detailed error when spawning new process fails

Knut Anders Hatlen created DERBY-6295:
-----------------------------------------

             Summary: Allow tests to show detailed error when spawning new process fails
                 Key: DERBY-6295
                 URL: https://issues.apache.org/jira/browse/DERBY-6295
             Project: Derby
          Issue Type: Improvement
          Components: Test
    Affects Versions: 10.11.0.0
            Reporter: Knut Anders Hatlen
            Priority: Minor


In recent versions of Java, Runtime.exec() will hide the underlying exception unless the code base is granted read permission on the executable file.

Example:

These two failures probably have the same cause:

http://download.java.net/javadesktop/derby/javadb-5579292-report/javadb-task-3689381.html
http://download.java.net/javadesktop/derby/javadb-5579170-report/javadb-task-3688261.html

The former, running on an older JVM, shows the real cause:

java.io.IOException: Cannot run program "/localhome/tendril4.2/work/install/sun-jdk-7u10-fcs-bin-b31/jdk7_10/jdk1.7.0_10/jre/bin/java": error=12, Not enough space
Caused by: java.io.IOException: error=12, Not enough space

The latter, running on a more recent JVM, hides the real failure behind an AccessControlException:

java.io.IOException: Cannot run program "/localhome/tendril4.2/work/install/sun-jdk-8-ea-bin-b93/jdk8/jdk1.8.0/jre/bin/java"
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/localhome/tendril4.2/work/install/sun-jdk-8-ea-bin-b93/jdk8/jdk1.8.0/jre/bin/java" "read")

We should consider changing the following grant in derby_tests.policy to include "read" in order to make it easier to see why a test is failing:

  // Tests need to be able to exec a java program.
  permission java.io.FilePermission "${java.home}${/}-", "execute";	

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira