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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via htmlunit by vladimirromanov
, 1 year ago
org.mozilla.javascript.EcmaError cannot be cast to org.mozilla.javascript.JavaScriptException
java.lang.ClassCastException: org.mozilla.javascript.EcmaError cannot be cast to org.mozilla.javascript.JavaScriptException
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3934)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3004)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:465)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:430)
at org.mozilla.javascript.Context.call(Context.java:502)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:437)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:917)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventListeners(EventListenersContainer.java:126)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:163)
at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:550)
at org.mozilla.javascript.Context.call(Context.java:502)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:1255)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1154)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:170)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:456)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:331)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.