You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by otisg <ot...@ureach.com> on 2003/03/13 22:03:32 UTC
Junit and java.security.AccessControlException: access denied (file permission)
Hello,
I am using Ant 1.5.2 with JDK 1.4.1_02 on a
Red Hat 7.3.
Then running JUnit task I always get an
error such as this one:
[junit] Running
net.wgen.amp.action.ExampleActionTest
[junit] Exception in thread "main"
java.security.AccessControlException: access
denied (java.io.FilePermission
/home/otis/wgen/eclipse-workspace/mclass/ampNG/build/reports/ut/TEST-net.wgen.amp.action.ExampleActionTest.xml
write)
[junit] at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
[junit] at
java.security.AccessController.checkPermission(AccessController.java:401)
[junit] at
java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
[junit] at
java.lang.SecurityManager.checkWrite(SecurityManager.java:975)
[junit] at
java.io.FileOutputStream.<init>(FileOutputStream.java:169)
[junit] at
java.io.FileOutputStream.<init>(FileOutputStream.java:131)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatter(FormatterElement.java:206)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.createAndStoreFormatter(JUnitTestRunner.java:562)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:507)
[junit] TEST
net.wgen.amp.action.ExampleActionTest FAILED
I cannot figure out why this is happening.
Even if I do 'chmod -R 777 reports' (reports
is the directory where unit test reports go)
and re-run Ant, I still get the same error!
Even if I touch the XML file that supposedly
cannot be created/written to disk, and make
it world writable, I still get the error.
Does anyone know what the problem is here?
Thank you,
Otis
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag