From: Ronald B. <rb...@rb...> - 2020-12-09 06:40:08
|
Hi Lora, can you please open an issue on github for this. Thanks RBRi Am 9. Dezember 2020 04:55:08 MEZ schrieb Lora Powell <lrp...@us...>: >I am wondering about the compatibility with my dojo javascript code for > >charting. I thought that HtmlUnit was compatible, but I am getting the > >following errors when running the html with a simple constructor to try > >modifying the typescript: > >url: >http://9.5.57.191:2004/SystemiNavigator/com/ibm/as400/pt/dojoChart/HelloWorldScriptLauncher.html?packageId=IBM_CS&perspectiveId=P_SYS_SUMMARY_CPU_WAITS_OVERVIEW&perspectiveName=CPU > >Utilization and Waits >Overview&collectionName=TEST1&collectionLib=PDI&collectionType=Collection > >Services File Based Collection&fileLevel=54&startTime=Aug 31, 2020 >3:22:09 >PM&endTime=Sep 1, 2020 12:00:11 AM&systemName=A405BP4 >&release=V7R4M0&collectionFormat=*CSFILE&basePerspId= >Exception in thread "main" ======= EXCEPTION START ======== >Exception >class=[net.sourceforge.htmlunit.corejs.javascript.WrappedException] >com.gargoylesoftware.htmlunit.ScriptException: Wrapped >com.gargoylesoftware.htmlunit.ScriptException: Wrapped >com.gargoylesoftware.htmlunit.ScriptException: TypeError: Method >"stack" >called on incompatible object. ( >http://9.5.57.191:2004/auiruntime8106/dojo/dojo/dojo.js#10796) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run( >JavaScriptEngine.java:949) > at net.sourceforge.htmlunit.corejs.javascript.Context.call( >Context.java:619) > at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call( >ContextFactory.java:537) > at >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured( >HtmlUnitContextFactory.java:353) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute( >JavaScriptEngine.java:829) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute( >JavaScriptEngine.java:805) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute( >JavaScriptEngine.java:796) > at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScript( >HtmlPage.java:943) > at >com.gargoylesoftware.htmlunit.html.ScriptElementSupport.executeInlineScriptIfNeeded( >ScriptElementSupport.java:364) > at >com.gargoylesoftware.htmlunit.html.ScriptElementSupport.executeScriptIfNeeded( >ScriptElementSupport.java:213) > at >com.gargoylesoftware.htmlunit.html.ScriptElementSupport$1.execute( >ScriptElementSupport.java:106) > at >com.gargoylesoftware.htmlunit.html.ScriptElementSupport.onAllChildrenAddedToPage( >ScriptElementSupport.java:129) > at >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage( >HtmlScript.java:190) > at >com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement( >HtmlUnitNekoDOMBuilder.java:552) > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >Source) > at >com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement( >HtmlUnitNekoDOMBuilder.java:504) > at >net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.callEndElement( >HTMLTagBalancer.java:1215) > at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.endElement( >HTMLTagBalancer.java:1155) > at >net.sourceforge.htmlunit.cyberneko.filters.DefaultFilter.endElement( >DefaultFilter.java:219) > at >net.sourceforge.htmlunit.cyberneko.filters.NamespaceBinder.endElement( >NamespaceBinder.java:312) > at >net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanEndElement( >HTMLScanner.java:3189) > at >net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan( >HTMLScanner.java:2114) > at net.sourceforge.htmlunit.cyberneko.HTMLScanner.scanDocument( >HTMLScanner.java:937) > at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse( >HTMLConfiguration.java:443) > at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse( >HTMLConfiguration.java:394) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at >com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.parse( >HtmlUnitNekoDOMBuilder.java:752) > at >com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoHtmlParser.parse( >HtmlUnitNekoHtmlParser.java:208) > at >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage( >DefaultPageCreator.java:283) > at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage( >DefaultPageCreator.java:163) > at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto( >WebClient.java:634) > at com.gargoylesoftware.htmlunit.WebClient.getPage( >WebClient.java:456) > at com.gargoylesoftware.htmlunit.WebClient.getPage( >WebClient.java:368) > at com.gargoylesoftware.htmlunit.WebClient.getPage( >WebClient.java:525) > at com.gargoylesoftware.htmlunit.WebClient.getPage( >WebClient.java:506) > at com.ibm.PDIScript.runDojoChart.export(runDojoChart.java:448) > at com.ibm.PDIScript.runDojoChart.main(runDojoChart.java:154) >Caused by: net.sourceforge.htmlunit.corejs.javascript.WrappedException: > >Wrapped com.gargoylesoftware.htmlunit.ScriptException: Wrapped >com.gargoylesoftware.htmlunit.ScriptException: TypeError: Method >"stack" >called on incompatible object. ( >http://9.5.57.191:2004/auiruntime8106/dojo/dojo/dojo.js#10796) > at >net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx( >Context.java:1964) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.doProcessPostponedActions( >JavaScriptEngine.java:1002) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run( >JavaScriptEngine.java:944) > ... 36 more >Caused by: com.gargoylesoftware.htmlunit.ScriptException: Wrapped >com.gargoylesoftware.htmlunit.ScriptException: TypeError: Method >"stack" >called on incompatible object. ( >http://9.5.57.191:2004/auiruntime8106/dojo/dojo/dojo.js#10796) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run( >JavaScriptEngine.java:949) > at net.sourceforge.htmlunit.corejs.javascript.Context.call( >Context.java:619) > at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call( >ContextFactory.java:537) > at >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured( >HtmlUnitContextFactory.java:353) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction( >JavaScriptEngine.java:878) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction( >JavaScriptEngine.java:850) > at >com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunction( >HtmlPage.java:2609) > at >com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunction( >HtmlPage.java:2602) > at >com.gargoylesoftware.htmlunit.javascript.host.event.EventListenersContainer.executeEventListeners( >EventListenersContainer.java:342) > at >com.gargoylesoftware.htmlunit.javascript.host.event.EventListenersContainer.executeAtTargetListeners( >EventListenersContainer.java:379) > at >com.gargoylesoftware.htmlunit.javascript.host.event.EventTarget.executeEventLocally( >EventTarget.java:102) > at >com.gargoylesoftware.htmlunit.html.ScriptElementSupport.executeEvent( >ScriptElementSupport.java:320) > at >com.gargoylesoftware.htmlunit.html.ScriptElementSupport.executeScriptIfNeeded( >ScriptElementSupport.java:186) > at >com.gargoylesoftware.htmlunit.html.ScriptElementSupport$1.execute( >ScriptElementSupport.java:106) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.doProcessPostponedActions( >JavaScriptEngine.java:997) > ... 37 more > >Line 448 has the call to WebClient: > > url = " >http://9.5.57.191:2004/SystemiNavigator/com/ibm/as400/pt/dojoChart/HelloWorldScriptLauncher.html?packageId=IBM_CS&perspectiveId=P_SYS_SUMMARY_CPU_WAITS_OVERVIEW&perspectiveName=CPU > >Utilization and Waits >Overview&collectionName=TEST1&collectionLib=PDI&collectionType=Collection > >Services File Based Collection&fileLevel=54&startTime=Aug 31, 2020 >3:22:09 >PM&endTime=Sep 1, 2020 12:00:11 AM&systemName=A405BP4 >&release=V7R4M0&collectionFormat=*CSFILE&basePerspId="; > > > try (final WebClient webClient = new >WebClient(BrowserVersion.CHROME)) { > java.util.logging.Logger.getLogger( >"com.gargoylesoftware").setLevel(java.util.logging.Level.OFF); > > webClient.getCache().clear(); > webClient.getOptions().setCssEnabled(true >); > webClient >.getOptions().setJavaScriptEnabled(true); > > webClient.setAjaxController(new >NicelyResynchronizingAjaxController()); > webClient >.getOptions().setThrowExceptionOnScriptError(true); > > Page page = webClient.getPage(url); // >line 448 > > >Lora Powell > >IBM i Systems and Technology Group >IBM Navigator for i - Performance on the web > >Dept GJC Location 15-2/B206 >Email: lrp...@us... >Phone office: 507-253-4191 cell: 507-261-0325 > >Do the next right thing. -- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet. |