java.lang.ClassCastException: org.mozilla.javascript.EcmaError cannot be cast to org.mozilla.javascript.JavaScriptException

htmlunit | vladimirromanov | 8 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    java.lang.ClassCastException: org.mozilla.javascript.EcmaErr

    htmlunit | 8 years ago | vladimirromanov
    java.lang.ClassCastException: org.mozilla.javascript.EcmaError cannot be cast to org.mozilla.javascript.JavaScriptException
  2. 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

      org.mozilla.javascript.EcmaError cannot be cast to org.mozilla.javascript.JavaScriptException

      at com.gargoylesoftware.htmlunit.javascript.DebugFrameImpl.onExceptionThrown()
    2. HtmlUnit
      DebugFrameImpl.onExceptionThrown
      1. com.gargoylesoftware.htmlunit.javascript.DebugFrameImpl.onExceptionThrown(DebugFrameImpl.java:142)
      1 frame
    3. Rhino
      ContextFactory.doTopCall
      1. org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3934)
      2. org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)
      3. org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
      4. org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
      4 frames
    4. HtmlUnit
      HtmlUnitContextFactory.doTopCall
      1. com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:170)
      1 frame
    5. Rhino
      InterpretedFunction.call
      1. org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3004)
      2. org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
      2 frames
    6. HtmlUnit
      JavaScriptEngine$HtmlUnitContextAction.run
      1. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:465)
      2. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:430)
      3. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:522)
      3 frames
    7. Rhino
      ContextFactory.call
      1. org.mozilla.javascript.Context.call(Context.java:502)
      2. org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
      2 frames
    8. HtmlUnit
      HtmlElement$2.run
      1. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:437)
      2. com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:917)
      3. com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventListeners(EventListenersContainer.java:126)
      4. com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:163)
      5. com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:550)
      6. com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:1251)
      6 frames
    9. Rhino
      ContextFactory.call
      1. org.mozilla.javascript.Context.call(Context.java:502)
      2. org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
      2 frames
    10. HtmlUnit
      WebClient.getPage
      1. com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:1255)
      2. com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1154)
      3. com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:170)
      4. com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:456)
      5. com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:331)
      6. com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:388)
      6 frames