From: David M. G. <mic...@gm...> - 2013-11-13 07:27:34
|
Hi, Thanks for the quick fix. When javascript is disabled everything works fine with the new snapshot. When javascript is enabled i still get an error net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot read property "childNodes" from null ( http://cdn.els-cdn.com/sd/js/sdX_133aR4.js#12) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3603) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3587) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3608) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3624) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3634) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1464) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1241) at script(http://cdn.els-cdn.com/sd/js/sdX_133aR4.js:12) at script(http://cdn.els-cdn.com/sd/js/sdX_133aR4.js:12) at script(http://cdn.els-cdn.com/sd/js/sdX_133aR4.js:2) at script(http://cdn.els-cdn.com/sd/js/sdX_133aR4.js:2) at script.Datepicker(http://cdn.els-cdn.com/sd/js/sdX_133aR4.js:21) at script(http://cdn.els-cdn.com/sd/js/sdX_133aR4.js:21) at script(http://cdn.els-cdn.com/sd/js/sdX_133aR4.js:21) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:405) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3031) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:561) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:669) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:602) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:570) at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:409) at com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:684) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:643) at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3116) at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2083) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:918) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:900) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:243) at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:189) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:437) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:311) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:376) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:361) at test.Test.main(Test.java:19) Thanks, David On Wed, Nov 13, 2013 at 8:23 AM, < htm...@li...> wrote: > Send Htmlunit-user mailing list submissions to > htm...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > or, via email, send a message with subject or body 'help' to > htm...@li... > > You can reach the person managing the list at > htm...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Htmlunit-user digest..." > > > Today's Topics: > > 1. Re: Exception when trying to get page with htmlunit (Ahmed Ashour) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 12 Nov 2013 22:23:02 -0800 (PST) > From: Ahmed Ashour <asa...@ya...> > Subject: Re: [Htmlunit-user] Exception when trying to get page with > htmlunit > To: "htm...@li..." > <htm...@li...> > Message-ID: > <138...@we...> > Content-Type: text/plain; charset="iso-8859-1" > > Hi David, > > Thanks to Ronald for the quick response. > > Issue is fixed in SVN. > > Yours, > Ahmed > > ________________________________ > From: Ahmed Ashour <asa...@ya...> > To: "htm...@li..." < > htm...@li...> > Sent: Tuesday, November 12, 2013 12:40 PM > Subject: Re: [Htmlunit-user] Exception when trying to get page with > htmlunit > > > > Hi David, > > This is an issue in CSSParser, a patch has been provided in? > https://sourceforge.net/p/cssparser/bugs/42/ > > Thanks, > Ahmed Ashour > > ________________________________ > From: David Michael Gang <mic...@gm...> > To: htm...@li... > Sent: Monday, November 11, 2013 12:13 PM > Subject: Re: [Htmlunit-user] Exception when trying to get page with > htmlunit > > > > > > > > > On Mon, Nov 11, 2013 at 11:11 AM, David Michael Gang < > mic...@gm...> wrote: > > Hi, > > > >Thanks for your quick reply. > >I changed the program and still getting errors: > >package test; > > > >import java.io.IOException; > >import java.net.MalformedURLException; > > > >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; > >import com.gargoylesoftware.htmlunit.WebClient; > >import com.gargoylesoftware.htmlunit.html.HtmlPage; > > > > > > > >public class Test { > >??? public static void main(String[] args) throws > FailingHttpStatusCodeException, MalformedURLException, IOException { > >??? ??? WebClient w = new WebClient(); > >??? ??? w.getOptions().setUseInsecureSSL(true); > >??? ??? HtmlPage p = w.getPage(" > https://www.sciencedirect.com/science/book/9780121346454"); > >??? ??? System.out.println(p.asText()); > >??? } > >??? > >??? > >} > > > > > >11/11/2013 11:09:09 > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > >WARNING: Obsolete content type encountered: 'text/javascript'. > >11/11/2013 11:09:10 > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > >WARNING: Obsolete content type encountered: 'application/x-javascript'. > >11/11/2013 11:09:10 > com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError > >SEVERE: runtimeError: message=[The data necessary to complete this > operation is not yet available.] sourceName=[ > https://cdn.optimizely.com/js/204774041.js] line=[31] lineSource=[null] > lineOffset=[0] > >null [0:0] Error in expression. (Invalid token "<EOF>". Was expecting one > of: <NUMBER>, "inherit", <IDENT>, <STRING>, <PLUS>, <HASH>, <EMS>, <EXS>, > <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, > <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, > <FREQ_HZ>, <FREQ_KHZ>, <PERCENTAGE>, <DIMENSION>, <URI>, <FUNCTION>, "-".) > >11/11/2013 11:09:12 > com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError > >SEVERE: runtimeError: message=[The data necessary to complete this > operation is not yet available.] sourceName=[ > http://cdn.els-cdn.com/sd/js/sdX_133aR4.js] line=[2] lineSource=[null] > lineOffset=[0] > >11/11/2013 11:09:13 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler > error > >WARNING: CSS error: 'http://cdn.els-cdn.com/sd/css/css_gen_v01_133aR4.css' > [945:46] Error in style rule. (Invalid token "!important". Was expecting > one of: <EOF>, <S>, <IDENT>, "}", ";".) > >11/11/2013 11:09:13 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler > warning > >WARNING: CSS warning: ' > http://cdn.els-cdn.com/sd/css/css_gen_v01_133aR4.css' [945:46] Ignoring > the following declarations in this rule. > >... > ? > WARNING: CSS error: ' > https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/base/jquery-ui.css' > [133:20] Error in style rule. (Invalid token " ". Was expecting one of: > <EOF>, "}", ";".) > >11/11/2013 11:09:13 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler > warning > >WARNING: CSS warning: ' > https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/base/jquery-ui.css' > [133:20] Ignoring the following declarations in this rule. > >11/11/2013 11:09:13 > com.gargoylesoftware.htmlunit.javascript.host.ActiveXObject jsConstructor > >WARNING: Automation server can't create object for > 'ShockwaveFlash.ShockwaveFlash'. > >11/11/2013 11:09:13 > com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError > >SEVERE: runtimeError: message=[Automation server can't create object for > 'ShockwaveFlash.ShockwaveFlash'.] sourceName=[ > http://cdn.els-cdn.com/sd/js/sdX_133aR4.js] line=[24] lineSource=[null] > lineOffset=[0] > >11/11/2013 11:09:17 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler > error > >WARNING: CSS error: ' > http://cdn.els-cdn.com/sd/css/css_results_page_sprite_v01_133aR4.css' > [766:5] Error in style rule. (Invalid token "*". Was expecting one of: > <EOF>, <S>, <IDENT>, "}", ";".) > >11/11/2013 11:09:17 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler > warning > >WARNING: CSS warning: ' > http://cdn.els-cdn.com/sd/css/css_results_page_sprite_v01_133aR4.css' > [766:5] Ignoring the following declarations in this rule. > >11/11/2013 11:09:17 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler > error > >... > ? > 11/11/2013 11:09:17 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler > error > >WARNING: CSS error: 'http://cdn.els-cdn.com/sd/css/css_pub_v01_133aR4.css' > [1135:4] Error in style rule. (Invalid token "*". Was expecting one of: > <EOF>, <S>, <IDENT>, "}", ";".) > >11/11/2013 11:09:17 com.gargoylesoftware.htmlunit.DefaultCssErrorHandler > warning > >WARNING: CSS warning: ' > http://cdn.els-cdn.com/sd/css/css_pub_v01_133aR4.css' [1135:4] Ignoring > the following declarations in this rule. > >11/11/2013 11:09:17 > com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError > >SEVERE: runtimeError: message=[An invalid or illegal selector was > specified (selector: '[id='ui-id-1'] ul:not(.ui-menu)' error: Invalid > selector: *[id="ui-id-1"] ul:not(*.ui-menu)).] sourceName=[ > http://cdn.els-cdn.com/sd/js/sdX_133aR4.js] line=[10] lineSource=[null] > lineOffset=[0] > >11/11/2013 11:09:18 > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > >WARNING: Obsolete content type encountered: 'application/x-javascript'. > >11/11/2013 11:09:18 > com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError > >SEVERE: runtimeError: message=[An invalid or illegal selector was > specified (selector: 'a:pdf' error: Invalid selector: a:pdf).] sourceName=[ > http://cdn.els-cdn.com/sd/js/sdX_133aR4.js] line=[10] lineSource=[null] > lineOffset=[0] > >Exception in thread "main" java.lang.NullPointerException > >?? ?at > com.steadystate.css.dom.CSSStyleDeclarationImpl.getPropertyValue(CSSStyleDeclarationImpl.java:109) > >?? ?at > com.gargoylesoftware.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration.applyStyleFromSelector(ComputedCSSStyleDeclaration.java:225) > >?? ?at > com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleSheet.modifyIfNecessary(CSSStyleSheet.java:242) > >?? ?at > com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleSheet.modifyIfNecessary(CSSStyleSheet.java:218) > >?? ?at > com.gargoylesoftware.htmlunit.javascript.host.Window.getComputedStyle(Window.java:1607) > >?? ?at > com.gargoylesoftware.htmlunit.javascript.host.Element.getCurrentStyle(Element.java:546) > >?? ?at > com.gargoylesoftware.htmlunit.html.DomNode.isDisplayed(DomNode.java:712) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.isVisible(HtmlSerializer.java:377) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendText(HtmlSerializer.java:371) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:126) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendHtmlUnorderedList(HtmlSerializer.java:229) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:188) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198) > >?? ?at > com.gargoylesoftware.htmlunit.html.HtmlSerializer.asText(HtmlSerializer.java:57) > >?? ?at com.gargoylesoftware.htmlunit.html.DomNode.asText(DomNode.java:760) > >?? ?at test.Test.main(Test.java:17) > > > >Thanks, > >David > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > > ------------------------------------------------------------------------------ > DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps > OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access > Free app hosting. Or install the open source package on any LAMP server. > Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! > http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk > > ------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > End of Htmlunit-user Digest, Vol 90, Issue 11 > ********************************************* > |