• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTTP Unit and Java 5

 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Recently I shifted my system to Java 5 and some of the HTTP unit tests which were working fine earlier are now not working with Java 5.

The exception I get is this -

[junit] Testcase: testLoginPageTestcase: testSearchTimings took 5.693 sec
[junit] Caused an ERROR
[junit] NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation.
[junit] org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation.
[junit] at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
[junit] at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
[junit] at org.apache.html.dom.HTMLDocumentImpl.cloneNode(Unknown Source)
[junit] at com.meterware.httpunit.ParsedHTML.getDOM(ParsedHTML.java:971)
[junit] at com.meterware.httpunit.WebResponse.getDOM(WebResponse.java:538)
[junit] at com.circus.edith.test.acceptance.WebsiteTest.isWellFormedDoc(WebsiteTest.java:161)
[junit] at com.circus.edith.test.acceptance.WebsiteTest.testSearchTimings(WebsiteTest.java:102)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


any idea what migt be causing this exception???

TIA,
- Manish
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anybody???

- Manish
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any idea what might be going on here?

- manish
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per this link -
http://sourceforge.net/mailarchive/message.php?msg_id=7398401
this is a known problem with newer Xerces implementation.

Is anybody using HTTPUnit successfuly with Java 5??? How do you manage to do that???

TIA,
- Manish
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This error can be caused in the oddest ways.

I have had it twice.

The first time I fixed by removing the doctype declaration, as per other posts.

The second time I fixed by moving the getTestContext().setBaseUrl("http://192.168.0.2/test");
line out of the constructor and into a separate
setUp method:

public void setUp() throws Exception {
super.setUp();
getTestContext().setBaseUrl("http://192.168.0.2/test");
}

this after 4 hours updating jwebunit, httpunit, xerces et al
to no effect.

Hope this helps
Tim
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic