Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

junitreport Ant 1.6.4 task fails with WebLogic 9.1

 
Michael Duffy
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm running Ant 1.6.4 using IntelliJ 6 EA, Weblogic 9.1 and its JDK 1.5.0_04. All is well except when I run the <junitreport> task. I get the following error message:



I've got the weblogic.jar in my Ant CLASSPATH. I've also moved the xalan.jar into Ant's /lib directory. Still have the problem. Any advice?

%
 
Michael Duffy
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found the problem: I had to remove the weblogic.jar from my Ant classpath.
 
Brad Wilkes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem. Once I got rid of weblogic.jar from the ANT_HOME's lib directory, it fixed my problem too. However, this is going to break all of my weblogic tasks. What do I do if I need to use both?
 
Brad Wilkes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like you, I have fixed my own problem! For everyone else who wishes to use junitreport and weblogic (for wlappc and other such tasks), you may get the following error in your build script if you use the <report> sub-element in your <junitreport> task:

Could not find a valid processor version implementation from weblogic.xml.jaxp.RegistrySAXTransformerFactory

This is a classpath ORDERING problem.

In Eclipse, make sure xalan.jar is before weblogic.jar

In ANT_HOME, rename xalan.jar to axalan.jar.

If anyone knows a system property we can use, please post it!
 
Vijay Dafal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I resolved by redefinining JUnitReport task
<taskdef name="junitreport" classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator">
<classpath>
<pathelement location="${ant-task.classpath}/ant-junit.jar" />
<pathelement location="${ant-task.classpath}/junit-4.4.jar" />
</classpath>
</taskdef>
This way it loads the required classes for XML Parsing from ant-junit only. junit-4.4 can be any version.

Enjoy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic