• 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

Getting a exception with httpunit WebResponse.getDOM()

 
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following code produces the following exception:

import org.w3c.dom.Document;

private void printDocumentModel(WebResponse webresponse) throws Exception
{
Document doc = webresponse.getDOM();
}

org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation.

at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)

at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)

at org.apache.html.dom.HTMLDocumentImpl.cloneNode(Unknown Source)

at com.meterware.httpunit.ParsedHTML.getDOM(ParsedHTML.java:975)

at com.meterware.httpunit.WebResponse.getDOM(WebResponse.java:538)

at uk.co.blueskyts.itour.ui.test.reason.TestReasonPage.printDocumentModel(TestReasonPage.java:437)

at uk.co.blueskyts.itour.ui.test.reason.TestReasonPage.testCreateAReason(TestReasonPage.java:123)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at junit.framework.TestCase.runTest(TestCase.java:154)

at junit.framework.TestCase.runBare(TestCase.java:127)

at junit.framework.TestResult$1.protect(TestResult.java:106)

at junit.framework.TestResult.runProtected(TestResult.java:124)

at junit.framework.TestResult.run(TestResult.java:111)

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 junit.textui.TestRunner.doRun(TestRunner.java:116)

at junit.textui.TestRunner.start(TestRunner.java:172)

at junit.textui.TestRunner.main(TestRunner.java:138)

I have the xerces.jar in my path do I need to add anyother jars

Thanks for any help

Tony
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like the Xerces version you are using doesn't support the operation HttpUnit is trying to invoke.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic