?
Solved

Classpath? Problem with HttpUnit/NekoHTML

Posted on 2003-02-24
7
Medium Priority
?
375 Views
Last Modified: 2012-06-27
I'm having a wierd classpath issue with nekohtml/httpunit


I'm using httpunit 1.5.1.. My tests run fine when I use Tidy, but I need to use the Neko parser b/c of an issue I'm having with params in a form (I've tried the httpunit prereleases it doesn't seem to keep my session....) anyways, when I switch to neko I get  a java.lang.NoSuchMethodError
     at com.meterware.httpunit.DOMParser.<init>(NekoHTMLParser.java:125)
 exception.

I have the following in my classpath:
  cactus-1.4b1.jar
   nekohtml.jar
   nekohtml-0.7.3/nekohtmlXni.jar
    xmlParserAPIs.jar
    junit.jar
    rt.jar
    aspectjrt-1.0.5.jar
    commons-httpclient-2.0alpha1-20020720.jar
    commons-logging-1.0.jar
    strutstest-1.9.6.jar
    sax.jar
    xercesMinimal.jar
    nekohtmlSamples.jar
    xercesImpl.jar
    xercesImpl.jar

I've tried various combinations and orderings of the jars with no luck...

Thanks
Mike




java.lang.NoSuchMethodError
     at com.meterware.httpunit.DOMParser.<init>(NekoHTMLParser.java:125)
     at com.meterware.httpunit.DOMParser.newParser(NekoHTMLParser.java:85)
     at com.meterware.httpunit.NekoHTMLParser.parse(NekoHTMLParser.java:48)
     at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:263)
     at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:973)
     at com.meterware.httpunit.WebResponse.access$100(WebResponse.java:51)
     at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:582)
     at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaScript.java:396)
     at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80)
     at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(JavaScriptEngineFactory.java:46)
     at com.meterware.httpunit.FrameHolder.<init>(FrameHolder.java:47)
     at com.meterware.httpunit.WebWindow.<init>(WebWindow.java:205)
     at com.meterware.httpunit.WebClient.<init>(WebClient.java:51)
     at com.meterware.httpunit.WebConversation.<init>(WebConversation.java:46)
     at TestSampleServlet.beginSaveToSessionOK(TestSampleServlet.java:46)
     at java.lang.reflect.Method.invoke(Native Method)
     at org.apache.cactus.AbstractTestCase.callBeginMethod(AbstractTestCase.java:290)
     at org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase.java:236)
     at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
     at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:195)
     at junit.framework.TestResult$1.protect(TestResult.java:106)
     at junit.framework.TestResult.runProtected(TestResult.java:124)
     at junit.framework.TestResult.run(TestResult.java:109)
     at junit.framework.TestCase.run(TestCase.java:118)
     at junit.framework.TestSuite.runTest(TestSuite.java:208)
     at junit.framework.TestSuite.run(TestSuite.java:203)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)

Thanks
Mike
0
Comment
Question by:sfotex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 8011054
Is that *exactly* what it's saying at the top of the stack trace?

java.lang.NoSuchMethodError
    at com.meterware.httpunit.DOMParser.<init>(NekoHTMLParser.java:125)
0
 
LVL 2

Author Comment

by:sfotex
ID: 8011094
Yeup,
Cut and pasted..
Here's a url with some info on configuring the parser...
http://www.apache.org/~andyc/neko/doc/html/settings.html

I've tried setting the domparser in the config...but no go..
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8011147
Looks like a bug in the meterware libraries to me - have you got the latest version?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Author Comment

by:sfotex
ID: 8011630
Everythings current..

It's bombing on the call to the super config:

 DOMParser( HTMLConfiguration configuration, HTMLPage page ) {
        super( configuration );
        _htmlPage = page;


HTMLConfiguration  extends  xerces.util.ParserConfigSettings

but the DomParser impli. super takes  
  xerces.xni.parser.ParserConfigSettings...
0
 
LVL 2

Author Comment

by:sfotex
ID: 8013387
Figured it out --
Seems that the srutstest.jar conflicts with nekohtml.jar

I moved strutstestcase below neko.jar and it works....

 
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8016127
OK - better get CS to refund you.
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8076710
PAQ'd and points refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question