I have included the correct jar files (xmlunit0.8.jar and junit3.8.1.jar)n my classpath, yet I keep receiving the following error in my class:
testCompareFiles(XmlFileTests)java.lang.NoSuchMethodError
at org.custommonkey.xmlunit.Diff.appendMessage(Unknown Source)
at org.custommonkey.xmlunit.Diff.toString(Unknown Source)
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(Unknown Source)
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(Unknown Source)
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(Unknown Source)
at XmlFileTests.testCompareFiles(XmlFileTests.java:51)
at XmlFileTests.main(XmlFileTests.java:39)
The code that I am trying to test is from an example method provided at the following link: http://xmlunit.sourceforge.net/XMLUnit.pdf
Which is as follows:
String myControlXML = "<msg><uuid>0x00435A8C</uuid></msg>";
String myTestXML = "<msg><localId>2376</localId></msg>";
assertXMLEqual("Comparing test xml to control xml",
myControlXML, myTestXML);
}
Any thoughts on what could be wrong???
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you sure you have the correct jars in the classpath? Perhaps there is more detail you could provide to help track down the cause? The only way I have been able to reproduce this problem is by mixing xmlunit0.8 with junit3.7.
Rgds,
Tim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have included the correct jar files (xmlunit0.8.jar and junit3.8.1.jar)n my classpath, yet I keep receiving the following error in my class:
testCompareFiles(XmlFileTests)java.lang.NoSuchMethodError
at org.custommonkey.xmlunit.Diff.appendMessage(Unknown Source)
at org.custommonkey.xmlunit.Diff.toString(Unknown Source)
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(Unknown Source)
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(Unknown Source)
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(Unknown Source)
at XmlFileTests.testCompareFiles(XmlFileTests.java:51)
at XmlFileTests.main(XmlFileTests.java:39)
The code that I am trying to test is from an example method provided at the following link: http://xmlunit.sourceforge.net/XMLUnit.pdf
Which is as follows:
String myControlXML = "<msg><uuid>0x00435A8C</uuid></msg>";
String myTestXML = "<msg><localId>2376</localId></msg>";
assertXMLEqual("Comparing test xml to control xml",
myControlXML, myTestXML);
}
Any thoughts on what could be wrong???
Are you sure you have the correct jars in the classpath? Perhaps there is more detail you could provide to help track down the cause? The only way I have been able to reproduce this problem is by mixing xmlunit0.8 with junit3.7.
Rgds,
Tim
This error occurs if you try and run the compiled / distributed jar with a JDK other than 1.4.x
Try switching to the 1.4 JDK or recompile the source using a JDK 1.3 compiler.
Thanks to Mike Rettig for pointing this out....
Rgds,
Tim