ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task
Date Thu, 28 Aug 2003 07:39:33 GMT
On 28 Aug 2003, Stefan Bodewig <bodewig@apache.org> wrote:

> While you are at it, PermissionsTest fails in Gump for me.

the gory details (it doesn't fail if I run it interactively, my locale
settings are different when using Gump which runs via cron, I don't
see any other difference at first glance):

<snip/>

    [junit] Testsuite: org.apache.tools.ant.taskdefs.optional.EchoPropertiesTest
    [junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.515 sec

    [junit] ------------- Standard Output ---------------
    [junit] -- listing properties --
    [junit] java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
    [junit] sun.boot.library.path=/usr/local/java/j2sdk1.4.1_02/jre/lib...
    [junit] java.vm.version=1.4.1_02-b06
    [junit] ant.java.version=1.4
    [junit] ant.file.test=/javastuff/gump/ant/src/etc/testcases...
    [junit] java.vm.vendor=Sun Microsystems Inc.
    [junit] java.vendor.url=http://java.sun.com/
    [junit] path.separator=:
    [junit] java.vm.name=Java HotSpot(TM) Client VM
    [junit] file.encoding.pkg=sun.io
    [junit] user.country=US
    [junit] sun.os.patch.level=unknown
    [junit] java.vm.specification.name=Java Virtual Machine Specification
    [junit] user.dir=/javastuff/gump/ant
    [junit] java.runtime.version=1.4.1_02-b06
    [junit] java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
    [junit] basedir=/javastuff/gump/ant/src/etc/testcases...
    [junit] java.endorsed.dirs=/usr/local/java/j2sdk1.4.1_02/jre/lib...
    [junit] os.arch=i386
    [junit] java.io.tmpdir=/tmp
    [junit] line.separator=

    [junit] java.vm.specification.vendor=Sun Microsystems Inc.
    [junit] os.name=Linux
    [junit] ant.home=${ant.home}
    [junit] sun.java2d.fontpath=
    [junit] ant.project.name=test
    [junit] java.library.path=/usr/local/java/j2sdk1.4.1_02/jre/lib...
    [junit] test.property=isSet
    [junit] java.specification.name=Java Platform API Specification
    [junit] java.class.version=48.0
    [junit] java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferences...
    [junit] os.version=2.4.20-20.7
    [junit] ant.file=/javastuff/gump/ant/src/etc/testcases...
    [junit] user.home=/home/bodewig
    [junit] b.set=false
    [junit] user.timezone=Europe/Berlin
    [junit] java.awt.printerjob=sun.print.PSPrinterJob
    [junit] java.specification.version=1.4
    [junit] build.tests=build/testcases
    [junit] file.encoding=ANSI_X3.4-1968
    [junit] tests-classpath.value=/javastuff/gump/ant/build/classes:/ja...
    [junit] user.name=bodewig
    [junit] java.class.path=/home/bodewig/dev/gump/xml-xerces2/ja...
    [junit] java.vm.specification.version=1.0
    [junit] sun.arch.data.model=32
    [junit] java.home=/usr/local/java/j2sdk1.4.1_02/jre
    [junit] java.specification.vendor=Sun Microsystems Inc.
    [junit] user.language=en
    [junit] java.vm.info=mixed mode
    [junit] java.version=1.4.1_02
    [junit] java.ext.dirs=/usr/local/java/j2sdk1.4.1_02/jre/lib...
    [junit] sun.boot.class.path=/home/bodewig/dev/gump/xml-commons/ja...
    [junit] java.vendor=Sun Microsystems Inc.
    [junit] a.set=true
    [junit] file.separator=/
    [junit] java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
    [junit] sun.cpu.endian=little
    [junit] sun.io.unicode.encoding=UnicodeLittle
    [junit] sun.cpu.isalist=

<snip/>

    [junit] Testsuite: org.apache.tools.ant.types.PermissionsTest
    [junit] Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 0.035 sec

    [junit] Testcase: testExit(org.apache.tools.ant.types.PermissionsTest):	Caused an ERROR
    [junit] Permission (java.util.PropertyPermission file.encoding read) was not granted.
    [junit] java.lang.SecurityException: Permission (java.util.PropertyPermission file.encoding
read) was not granted.
    [junit] 	at org.apache.tools.ant.types.Permissions$MySM.checkPermission(Permissions.java:201)
    [junit] 	at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
    [junit] 	at java.lang.System.getProperty(System.java:572)
    [junit] 	at sun.security.action.GetPropertyAction.run(GetPropertyAction.java:66)
    [junit] 	at java.security.AccessController.doPrivileged(Native Method)
    [junit] 	at sun.io.Converters.getDefaultEncodingName(Converters.java:66)
    [junit] 	at java.lang.StringCoding.decode(StringCoding.java:226)
    [junit] 	at java.lang.String.<init>(String.java:383)
    [junit] 	at java.io.ByteArrayOutputStream.toString(ByteArrayOutputStream.java:160)
    [junit] 	at org.apache.tools.ant.DemuxOutputStream.processBuffer(DemuxOutputStream.java:208)
    [junit] 	at org.apache.tools.ant.DemuxOutputStream.write(DemuxOutputStream.java:184)
    [junit] 	at org.apache.tools.ant.DemuxOutputStream.write(DemuxOutputStream.java:278)
    [junit] 	at java.io.PrintStream.write(PrintStream.java:258)
    [junit] 	at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:334)
    [junit] 	at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:402)
    [junit] 	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:113)
    [junit] 	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:169)
    [junit] 	at java.io.PrintStream.newLine(PrintStream.java:324)
    [junit] 	at java.io.PrintStream.println(PrintStream.java:586)
    [junit] 	at org.apache.tools.ant.types.PermissionsTest.testExit(PermissionsTest.java:170)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [junit] 	at java.lang.reflect.Method.invoke(Method.java:324)
    [junit] 	at junit.framework.TestCase.runTest(TestCase.java:154)
    [junit] 	at junit.framework.TestCase.runBare(TestCase.java:127)
    [junit] 	at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit] 	at junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit] 	at junit.framework.TestResult.run(TestResult.java:109)
    [junit] 	at junit.framework.TestCase.run(TestCase.java:118)
    [junit] 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
    [junit] 	at junit.framework.TestSuite.run(TestSuite.java:203)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:328)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:973)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:659)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:633)
    [junit] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:295)
    [junit] 	at org.apache.tools.ant.Task.perform(Task.java:401)
    [junit] 	at org.apache.tools.ant.Target.execute(Target.java:347)
    [junit] 	at org.apache.tools.ant.Target.performTasks(Target.java:374)
    [junit] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1237)
    [junit] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1094)
    [junit] 	at org.apache.tools.ant.Main.runBuild(Main.java:665)
    [junit] 	at org.apache.tools.ant.Main.startAnt(Main.java:220)
    [junit] 	at org.apache.tools.ant.Main.start(Main.java:184)
    [junit] 	at org.apache.tools.ant.Main.main(Main.java:267)

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message