Kevin Jackson wrote:
Hi,
On Windows with JDK6, the following tests fail:
I see the rmi tests on linux+the latest jdk6 too.
RmicAdvancedTest.testXnew
rmic.testXnew:
[base-rmic] RMI Compiling 1 class to
/home/slo/Java/Apache/ant/src/etc/testcases/taskdefs/rmic/build
[base-rmic] rmic: error - Doclet class sun.rmi.rmic.newrmic.Main does
not contain a start method
[base-rmic] 1 error
Well, there's our problem.
Actually, this whole area was trouble, look at this bug. that the
XNewRmic compiler points to
http://issues.apache.org/bugzilla/show_bug.cgi?id=38732
and, from the command line, xnewForked works
======================================================================
Entering project
In /home/slo/Java/Apache/ant/src/etc/testcases/taskdefs/rmic
======================================================================
rmic.testXnewForked:
[base-rmic] RMI Compiling 1 class to
/home/slo/Java/Apache/ant/src/etc/testcases/taskdefs/rmic/build
1. the testXnew should be skipped for Java6; don't know about
successors. But ignore this particular failure as it is something going
in rmic that we can't handle.
RmicAdvancedTest.testXnewForked
Error org.apache.xerces.parsers.XIncludeAwareParserConfiguration
cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
Now, this is fun. This routine works from the command line.
But under junit,
[junit] org.apache.xerces.parsers.XIncludeAwareParserConfiguration
cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
[junit] java.lang.ClassCastException:
org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be
cast to org.apache.xerces.xni.parser.XMLParserConfiguration
[junit] at org.apache.xerces.parsers.SAXParser.<init>(Unknown
Source)
[junit] at org.apache.xerces.parsers.SAXParser.<init>(Unknown
Source)
[junit] at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
[junit] at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown
Source)
[junit] at
org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
[junit] at
org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:215)
[junit] at
org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:172)
[junit] at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:182)
[junit] at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:138)
[junit] at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
[junit] at
org.apache.tools.ant.BuildFileTest.configureProject(BuildFileTest.java:289)
[junit] at
org.apache.tools.ant.BuildFileTest.configureProject(BuildFileTest.java:272)
[junit] at
org.apache.tools.ant.taskdefs.RmicAdvancedTest.setUp(RmicAdvancedTest.java:44)
Except, what happens if I coment out testXnew()?
apache-ant.junit-single-test-only:
[mkdir] Created dir: /home/slo/Java/Apache/ant/build/failingTests
[mkdir] Created dir: /home/slo/Java/Apache/ant/build/testcases/xml
[junit] Testsuite: org.apache.tools.ant.taskdefs.RmicAdvancedTest
[junit] Tests run: 23, Failures: 0, Errors: 0, Time elapsed: 9.004 sec
[junit] Testcase: testDefault took 0.597 sec
[junit] Testcase: testEmpty took 0.29 sec
[junit] Testcase: testRmic took 0.282 sec
[junit] Testcase: testRmicJArg took 0.284 sec
[junit] Testcase: testKaffe took 0.2 sec
[junit] Testcase: testWlrmic took 0.248 sec
[junit] Testcase: testWlrmicJArg took 0.171 sec
[junit] Testcase: testForkingAntClasspath took 0.745 sec
[junit] Testcase: testAntClasspath took 0.443 sec
[junit] Testcase: testBadName took 0.164 sec
[junit] Testcase: testExplicitClass took 0.289 sec
[junit] Testcase: testWrongClass took 0.196 sec
[junit] Testcase: testDefaultBadClass took 0.216 sec
[junit] Testcase: testMagicProperty took 0.185 sec
[junit] Testcase: testMagicPropertyOverridesEmptyString took 0.155 sec
[junit] Testcase: testMagicPropertyIsEmptyString took 0.227 sec
[junit] Testcase: testVersion11 took 0.216 sec
[junit] Testcase: testVersion12 took 0.262 sec
[junit] Testcase: testVersionCompat took 0.29 sec
[junit] Testcase: testXnewForked took 1.146 sec
[junit] Testcase: testXnewCompiler took 1.214 sec
[junit] Testcase: testIDL took 0.793 sec
[junit] Testcase: testIIOP took 0.348 sec
Hypothesis: running -Xnew compiler in Java6 unforked screws up Ant for
the rest of the life of the process, by fiddling with the XML factories.
Whoever wrote that code made some assumptions about running in a self
contained process that doesnt hold.
Here's some options
1. Turn off testXNew
-stops rmic failing, stops the followon tests failing. hides any
problems with rmic on java
2 patch SunRmic to see the -Xnew parameter, and fail the build, tell
the user they need to fork the jvm
-changes test outcome on java6+, but leads to a better end user experience
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]