ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From otisg <ot...@ureach.com>
Subject Junit test can't write XML reports (permission, Windows)
Date Mon, 23 Sep 2002 14:03:11 GMT
Hello,

I am using Ant 1.5 and Java 1.3.1 on Windows.

I did not find anything similar in the
mailing list archive.

I am running Junit task and getting an
error, which claims that there is a file
access/permission problem.
However, this error occurrs only if tests
fail.  If tests pass, reports are generated
without problems.

    [junit] Running
net.wgen.amp.action.ViewStudentsInClassActionTest
    [junit]
java.security.AccessControlException: access
denied (java.io.FilePermission
C:\NightlyBuild\checkout\mclass\javaserver\build\reports\ut\TEST-net.wgen.amp.action.ViewStudentsInClassActionTest.xml
write)
    [junit]  at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:267)
    [junit]  at
java.security.AccessController.checkPermission(AccessController.java:394)
    [junit]  at
java.lang.SecurityManager.checkPermission(SecurityManager.java:540)
    [junit]  at
java.lang.SecurityManager.checkWrite(SecurityManager.java:973)
    [junit]  at
java.io.FileOutputStream.<init>(FileOutputStream.java:91)
    [junit]  at
java.io.FileOutputStream.<init>(FileOutputStream.java:57)
    [junit]  at
java.io.FileOutputStream.<init>(FileOutputStream.java:127)
    [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:550)
    [junit]  at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:495)
    [junit] Exception in thread "main" 


However, there are no problems with permissions.
This is happening only when tests are failing.
This is happening on a Windows machine.
The target directory exists.
I (the user running this) can create a text
file in the target directory.

I have a feeling that the problem is
something else, and it is just manifesting
itself this way, with a misleading error
message.
I have run ant with -debug, but that didn't
reveal any further information.

Does anyone know what could be causing this
error?

Thank you,
Otis


________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message