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

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 com.gargoylesoftware.htmlunit.javascript.DebugFrameImpl.onExceptionThrown(DebugFrameImpl.java:142)	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.ContextFactory.doTopCall(ContextFactory.java:401)	at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:170)	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 com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:522)	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 com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:1251)	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)	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:388)