Junitreport Task Errors
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Scott_Rickard
Posted On:   Thursday, August 23, 2001 11:05 AM

Hello. I am running Ant 1.3 on and AIX 4.3.3 system, using the IBM JDK 1.3.3, and I am having trouble implementing the junitreport task. Initially, I was using v1 of xalan.jar and xerces.jar files, but this yielded an error during xml tranformation during the Junitreport step. I have attached error stack traces below. I tried to remedy this problem by downloading and installing the xalan-j v2 jar files, and using the xalanj1compat.jar file first in my classpath, as the documentation for the junitreport command states. However, since there is no way to set the classpath for the junitreport command individually, when I update my classpath for my ANT build bat   More>>


Hello. I am running Ant 1.3 on and AIX 4.3.3 system, using
the IBM JDK 1.3.3, and I am having trouble implementing the
junitreport task. Initially, I was using v1 of xalan.jar and
xerces.jar files, but this yielded an error during xml tranformation
during the Junitreport step. I have attached error stack traces
below.


I tried to remedy this problem by downloading and installing
the xalan-j v2 jar files, and using the xalanj1compat.jar file
first in my classpath, as the documentation for the junitreport
command states. However, since there is no way to set the
classpath for the junitreport command individually, when I
update my classpath for my ANT build batch file accordingly,
the ANT process actually fails to properly parse my buildfile
(which worked with the previous version of xalan) and will
not proceed at all. If anyone has any suggestions, it would be
greatly appreciated - I can post the specific errors I am getting
if it would help.


Thanks in Advance,
Scott Rickard
rickard43@home.com

			
Original Error when using v1 XALAN - XERCES
run_test_report:
XSL Error: Cannot use a DTMLiaison for a input DOM node... pass a org.apache.xalan.xpath.xdom.XercesLiaison instead!
XSL Error: SAX Exception
org.apache.xalan.xslt.XSLProcessorException:
at java.lang.Exception. (Exception.java:44)
at org.xml.sax.SAXException. (SAXException.java:38)
at org.apache.xalan.xpath.XPathException. (XPathException.java:92)
at org.apache.xalan.xslt.XSLProcessorException. (XSLProcessorException.java:77)
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1676)
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1568)
at org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.java:826)
at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:552)
at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:460)
at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.createSinglePageSummary(AggregateTransformer.java:266)
at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:229)
at org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.execute(XMLResultAggregator.java:169)
at org.apache.tools.ant.Target.execute(Target.java(Compiled Code))
at org.apache.tools.ant.Project.runTarget(Project.java:898)
at org.apache.tools.ant.Project.executeTarget(Project.java:536)
at org.apache.tools.ant.Project.executeTargets(Project.java:510)
at org.apache.tools.ant.Main.runBuild(Main.java:421)
at org.apache.tools.ant.Main.main(Main.java:149)

BUILD FAILED

/home/srmmlm/sourcetree/srm5.0/srm50.xml:151: Errors while applying transformations
--- Nested Exception ---
org.apache.xalan.xslt.XSLProcessorException:
at java.lang.Exception. (Exception.java:44)
at org.xml.sax.SAXException. (SAXException.java:38)
at org.apache.xalan.xpath.XPathException. (XPathException.java:92)
at org.apache.xalan.xslt.XSLProcessorException. (XSLProcessorException.java:77)
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1676)
at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1568)
at org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.java:826)
at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:552)
at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:460)
at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.createSinglePageSummary(AggregateTransformer.java:266)
at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:229)
at org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.execute(XMLResultAggregator.java:169)
at org.apache.tools.ant.Target.execute(Target.java(Compiled Code))
at org.apache.tools.ant.Project.runTarget(Project.java:898)
at org.apache.tools.ant.Project.executeTarget(Project.java:536)
at org.apache.tools.ant.Project.executeTargets(Project.java:510)
at org.apache.tools.ant.Main.runBuild(Main.java:421)
at org.apache.tools.ant.Main.main(Main.java:149)



Here is the Error when using xalanj-2 and xalanj1compat.jar when
launching ANT - I tried with both versions of xerces, and get the
same response when the new xalan is in the classpath:


Buildfile: srm50.xml

BUILD FAILED

/home/srmmlm/sourcetree/srm5.0/srm50.xml:155: java.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer, method: getXSLStreamSource signature: (Ljava/lang/String;)Lorg/apache/xalan/xslt/XSLTInputSource;) Incompatible object argument for method call
--- Nested Exception ---
java.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer, method: getXSLStreamSource signature: (Ljava/lang/String;)Lorg/apache/xalan/xslt/XSLTInputSource;) Incompatible object argument for method call
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.tools.ant.IntrospectionHelper$1.create(IntrospectionHelper.java:167)
at org.apache.tools.ant.IntrospectionHelper.createElement(IntrospectionHelper.java:275)
at org.apache.tools.ant.ProjectHelper$NestedElementHandler.init(ProjectHelper.java:535)
at org.apache.tools.ant.ProjectHelper$TaskHandler.startElement(ProjectHelper.java:499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java(Compiled Code))
at com.sun.xml.parser.Parser.content(Parser.java(Compiled Code))
at com.sun.xml.parser.Parser.maybeElement(Parser.java(Compiled Code))
at com.sun.xml.parser.Parser.content(Parser.java(Compiled Code))
at com.sun.xml.parser.Parser.maybeElement(Parser.java(Compiled Code))
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:117)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
at org.apache.tools.ant.Main.runBuild(Main.java:403)
at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 1 second




As you can see i'm stuck between a rock and a hard place -
please help if you can....thanks. sr.    <<Less

Re: Junitreport Task Errors

Posted By:   Erik_Hatcher  
Posted On:   Sunday, August 26, 2001 05:20 PM

This issue has been resolved in Ant 1.4. Give its latest beta release build a try. The problem can be resolved with Ant 1.3 by removing jaxp.jar and crimson.jar from Ant's lib directory and putting Xerces and Xalan in place of them.

Re: Junitreport Task Errors

Posted By:   Erik_Hatcher  
Posted On:   Thursday, August 23, 2001 02:34 PM

I recommend switching to Ant 1.4 (currently in beta, but its stable and fixes this particular issue).


To stick with Ant 1.3 you'll want to use the above technique, but also remove jaxp.jar and crimson.jar from the Ant lib directory - that will likely fix your problem.

About | Sitemap | Contact