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 Rick Hillegas <Ri...@Sun.COM> on 2007/10/24 23:35:23 UTC
security exceptions when running the junit tests via the ant harness
I am seeing security exceptions when I run the junit tests via the ant
harness. Since I don't normally run the junit tests that way, I'm
guessing this is an environment problem. Does the following kind of
error look familiar to anyone? Thanks-Rick
[junit] Running
org.apache.derbyTesting.functionTests.tests.jdbcapi.JDBCDriversEmbeddedTest
[junit] Exception in thread "main"
java.security.AccessControlException: access denied
(java.io.FilePermission
/Users/rh161140/derby/mainline/trunk/junitvmwatcher704717555.properties
write)
[junit] at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
[junit] at
java.security.AccessController.checkPermission(AccessController.java:427)
[junit] at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
[junit] at
java.lang.SecurityManager.checkWrite(SecurityManager.java:962)
[junit] at
java.io.FileOutputStream.<init>(FileOutputStream.java:169)
[junit] at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
[junit] at java.io.FileWriter.<init>(FileWriter.java:46)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.registerTestCase(JUnitTestRunner.java:940)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.access$000(JUnitTestRunner.java:68)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$3.startTest(JUnitTestRunner.java:807)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$4.startTest(JUnitTestRunner.java:1005)
[junit] at junit.framework.TestResult.startTest(TestResult.java:151)
[junit] at junit.framework.TestResult.run(TestResult.java:103)
[junit] at junit.framework.TestCase.run(TestCase.java:120)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:230)
[junit] at junit.framework.TestSuite.run(TestSuite.java:225)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:230)
[junit] at junit.framework.TestSuite.run(TestSuite.java:225)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:230)
[junit] at junit.framework.TestSuite.run(TestSuite.java:225)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
[junit] Running
org.apache.derbyTesting.functionTests.tests.jdbcapi.JDBCDriversEmbeddedTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
C-c C-c
[junit] Test
org.apache.derbyTesting.functionTests.tests.jdbcapi.JDBCDriversEmbeddedTest
FAILED (crashed)
Re: security exceptions when running the junit tests via the ant
harness
Posted by Rick Hillegas <Ri...@Sun.COM>.
Daniel John Debrunner wrote:
> Rick Hillegas wrote:
>> I am seeing security exceptions when I run the junit tests via the
>> ant harness. Since I don't normally run the junit tests that way, I'm
>> guessing this is an environment problem. Does the following kind of
>> error look familiar to anyone? Thanks-Rick
>
> Did you solve this? I see it when using ant 1.7.0, but not with ant
> 1.6.5.
>
> Dan.
Thanks for that information, Dan. I am running ant 1.7.0. I kludged
around the problem by editting derby_tests.policy. I granted all
codebases the privilege to write to the directory where the jvmwatcher
was trying to open a file. With a little sanding down, that could be
worked into a solution I guess. I will push this around a little more
and probably open a JIRA.
Regards,
-Rick
Re: security exceptions when running the junit tests via the ant
harness
Posted by Daniel John Debrunner <dj...@apache.org>.
Rick Hillegas wrote:
> I am seeing security exceptions when I run the junit tests via the ant
> harness. Since I don't normally run the junit tests that way, I'm
> guessing this is an environment problem. Does the following kind of
> error look familiar to anyone? Thanks-Rick
Did you solve this? I see it when using ant 1.7.0, but not with ant 1.6.5.
Dan.