B
Bajan Cherry
I am a newbie so far as Java is concerned. I wrote my first Java code
to test out websites using httpunit. The code worked fine until I
decided to use XPath instead of DOM APIs to search through the XML.
Now when I run the code, I get following exception:
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.xerces.xni.Augmentations: method clear()V not found
at org.cyberneko.html.HTMLScanner.locationAugs(Unknown Source)
at org.cyberneko.html.HTMLScanner$ContentScanner.scan(Unknown Source)
at org.cyberneko.html.HTMLScanner.scanDocument(Unknown Source)
at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at com.meterware.httpunit.parsing.NekoHTMLParser.parse(NekoHTMLParser.java:41)
<OTHER LINES DELETED>
I am using WSAD with IBM JRE, which includes XercesImpl classes in
xml.jar. I checked this jar and notice that it does not implement
method clear(), whereas a method removeall() is included. The
distribution of XercesImpl included with httpunit does implement
clear() but no removeall().
Changing the build order by promoting httpunit bundled xercesimpl did
not have the desired effect.
Please help - I have already started missing my C++
to test out websites using httpunit. The code worked fine until I
decided to use XPath instead of DOM APIs to search through the XML.
Now when I run the code, I get following exception:
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.xerces.xni.Augmentations: method clear()V not found
at org.cyberneko.html.HTMLScanner.locationAugs(Unknown Source)
at org.cyberneko.html.HTMLScanner$ContentScanner.scan(Unknown Source)
at org.cyberneko.html.HTMLScanner.scanDocument(Unknown Source)
at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at com.meterware.httpunit.parsing.NekoHTMLParser.parse(NekoHTMLParser.java:41)
<OTHER LINES DELETED>
I am using WSAD with IBM JRE, which includes XercesImpl classes in
xml.jar. I checked this jar and notice that it does not implement
method clear(), whereas a method removeall() is included. The
distribution of XercesImpl included with httpunit does implement
clear() but no removeall().
Changing the build order by promoting httpunit bundled xercesimpl did
not have the desired effect.
Please help - I have already started missing my C++