Menu

#1135 Error JS on 2.8 (2.7 work ok)

Latest SVN
closed
None
5
2012-10-21
2010-07-14
jotremar
No

If you make:
HtmlPage page = webClient.getPage("http://www.cajamar.es");

It take a error, but only on 2.8, 2.7 work ok.

Exception in thread "main" ======= EXCEPTION START ========
Exception class=[java.lang.RuntimeException]
com.gargoylesoftware.htmlunit.ScriptException: Exception invoking jsxFunction_querySelectorAll
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:601)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:531)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:906)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventListeners(EventListenersContainer.java:164)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:223)
at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:696)
at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:889)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538)
at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:894)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1144)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:212)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:436)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:307)
at com.gargoylesoftware.htmlunit.ImmediateRefreshHandler.handleRefresh(ImmediateRefreshHandler.java:60)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1258)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:226)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:436)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:307)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354)
at parsercaixa.CajaMar.buscarIngreso(CajaMar.java:49)
at parsercaixa.CajaMar.main(CajaMar.java:37)
Caused by: java.lang.RuntimeException: Exception invoking jsxFunction_querySelectorAll
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:198)
at net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:479)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1702)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:429)
at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:269)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3162)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:559)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:524)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:595)
... 24 more
Caused by: com.steadystate.css.sac.TestCSSParseException: Error in attribute selector. Invalid token "^". Was expecting one of: <S>, "=", "]", "~=", "|=".
at com.steadystate.css.parser.AbstractSACParser.toCSSParseException(AbstractSACParser.java:283)
at com.steadystate.css.parser.SACParserCSS21.attrib(SACParserCSS21.java:1367)
at com.steadystate.css.parser.SACParserCSS21.simpleSelector(SACParserCSS21.java:1117)
at com.steadystate.css.parser.SACParserCSS21.selector(SACParserCSS21.java:1059)
at com.steadystate.css.parser.SACParserCSS21.selectorList(SACParserCSS21.java:1009)
at com.steadystate.css.parser.AbstractSACParser.parseSelectors(AbstractSACParser.java:380)
at com.steadystate.css.parser.CSSOMParser.parseSelectors(CSSOMParser.java:186)
at com.gargoylesoftware.htmlunit.html.HtmlPage.querySelectorAll(HtmlPage.java:2295)
at com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument.jsxFunction_querySelectorAll(HTMLDocument.java:1587)
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:597)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:172)
... 35 more
Enclosed exception:
java.lang.RuntimeException: Exception invoking jsxFunction_querySelectorAll
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:198)
at net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:479)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1702)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:429)
at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:269)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3162)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:559)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:524)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:595)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:531)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:906)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventListeners(EventListenersContainer.java:164)
at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:223)
at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:696)
at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:889)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538)
at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:894)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1144)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:212)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:436)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:307)
at com.gargoylesoftware.htmlunit.ImmediateRefreshHandler.handleRefresh(ImmediateRefreshHandler.java:60)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1258)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:226)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:436)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:307)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354)
at parsercaixa.CajaMar.buscarIngreso(CajaMar.java:49)
at parsercaixa.CajaMar.main(CajaMar.java:37)
Caused by: com.steadystate.css.sac.TestCSSParseException: Error in attribute selector. Invalid token "^". Was expecting one of: <S>, "=", "]", "~=", "|=".
at com.steadystate.css.parser.AbstractSACParser.toCSSParseException(AbstractSACParser.java:283)
at com.steadystate.css.parser.SACParserCSS21.attrib(SACParserCSS21.java:1367)
at com.steadystate.css.parser.SACParserCSS21.simpleSelector(SACParserCSS21.java:1117)
at com.steadystate.css.parser.SACParserCSS21.selector(SACParserCSS21.java:1059)
at com.steadystate.css.parser.SACParserCSS21.selectorList(SACParserCSS21.java:1009)
at com.steadystate.css.parser.AbstractSACParser.parseSelectors(AbstractSACParser.java:380)
at com.steadystate.css.parser.CSSOMParser.parseSelectors(CSSOMParser.java:186)
at com.gargoylesoftware.htmlunit.html.HtmlPage.querySelectorAll(HtmlPage.java:2295)
at com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument.jsxFunction_querySelectorAll(HTMLDocument.java:1587)
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:597)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:172)
... 35 more
== CALLING JAVASCRIPT ==

function () {
return typeof o !== "undefined" && !o.event.triggered ? o.event.handle.apply(arguments.callee.elem, arguments) : g;
}

======= EXCEPTION END ========
Java Result: 1

Discussion

  • Marc Guillemot

    Marc Guillemot - 2010-10-08

    It works just fine testing today with latest sources from SVN. Perhaps has it been fixed since 2.8 or perhaps the website has changed since you've had the problem.

    Please reopen (or open a new issue) with more information if the problem arises again.

     
  • jotremar

    jotremar - 2010-10-08

    It has been changed, it work now with first release of 2.8.

     

Log in to post a comment.