java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage

htmlunit | ellecer | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    WebClient.getPage exception on XML if WebClient is FIREFOX_2

    htmlunit | 9 years ago | ellecer
    java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage
  2. 0

    HtmlUnit / Mailing Lists

    sourceforge.net | 11 months ago
    java.lang.ClassCastException: com.gargoylesoftware.htmlunit.UnexpectedPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage
  3. 0

    ClassCastException when loading PDFs in new window

    htmlunit | 9 years ago | kelvsyc
    java.lang.ClassCastException: com.gargoylesoftware.htmlunit.UnexpectedPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HtmlUnit - General - Re: Wrapped java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage

    nabble.com | 1 year ago
    java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage at com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:92) at com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1969) at com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:872) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:450)

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage

      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.init()
    2. HtmlUnit
      JavaScriptEngine$1.run
      1. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.init(JavaScriptEngine.java:225)
      2. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.access$000(JavaScriptEngine.java:96)
      3. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$1.run(JavaScriptEngine.java:156)
      3 frames
    3. Rhino
      Context.call
      1. org.mozilla.javascript.Context.call(Context.java:577)
      2. org.mozilla.javascript.Context.call(Context.java:499)
      2 frames
    4. HtmlUnit
      WebClient.getPage
      1. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.initialize(JavaScriptEngine.java:167)
      2. com.gargoylesoftware.htmlunit.WebClient.initialize(WebClient.java:1084)
      3. com.gargoylesoftware.htmlunit.WebWindowImpl.setEnclosedPage(WebWindowImpl.java:115)
      4. com.gargoylesoftware.htmlunit.DefaultPageCreator.createXmlPage(DefaultPageCreator.java:172)
      5. com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:95)
      6. com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:450)
      7. com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:359)
      8. com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:407)
      9. com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:395)
      9 frames