I am trying to get httpunit
testing to work. I am running NekoHTML 1.9.14. I get an error
java.lang.NoSuchMethodError: org.apache.xerces.parsers.DOMParser.<init>(Lorg/apache/xerces/xni/parser/XMLParserConfiguration;)V
at com.meterware.httpunit.parsing.NekoDOMParser.<init>(NekoDOMParser.java:130)
at com.meterware.httpunit.parsing.NekoDOMParser.newParser(NekoDOMParser.java:103)
at com.meterware.httpunit.parsing.NekoHTMLParser.parse(NekoHTMLParser.java:47)
at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:271)
at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1301)
...
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Now, my classpath(in eclipse) is:
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/sc_core"/>
<classpathentry kind="lib" path="lib/junit.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.7.jar"/>
<classpathentry kind="src" path="/sc_adapters"/>
<classpathentry kind="src" path="/sc_businessobjects"/>
<classpathentry kind="src" path="/sc_queueing"/>
<classpathentry kind="src" path="/sc_regulator"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/commons-digester.jar"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/commons-collections.jar"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/commons-beanutils.jar"/>
<classpathentry kind="src" path="/sc_workflow"/>
<classpathentry kind="src" path="/sc_datamanipulation"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/hibernate2.jar"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/j2ee-1.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/sc_wfeditor"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/mysql-connector-java-3.0.14-production-bin.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/sc_utilities"/>
<classpathentry combineaccessrules="false" kind="src" path="/sc_wfserver_http"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/jcommon-1.0.10.jar"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/jfreechart-1.0.6.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/sc_taglibrary"/>
<classpathentry combineaccessrules="false" kind="src" path="/sc_entity"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/commons-jxpath-1.1.jar"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/httpunit.jar" sourcepath="/Users/woo/Development/workspaces/sc_workspace/httpunit-1.7/src"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/js-14.jar"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/nekohtml.jar"/>
<classpathentry kind="lib" path="/ThirdPartyLibraries/xercesImpl.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
I have looked int xercesImpl and there is definitely a class "org.apache.xerces.parsers.DOMParser". This is the version 2+ of xercesImpl that was stated to be needed for nekohtml. The method message isn't clear to me. What else is missing? Why should this be so hard? If someone is trying to do httpunit testing, why not give a list or a bundle of the necessary jars?