From: Ahmed A. <asa...@ya...> - 2015-03-06 07:55:01
|
Hi, Can you provide a complete case, please? Ahmed From: stand4love <sta...@16...> To: htmlunit-user <htm...@li...> Sent: Friday, March 6, 2015 8:26 AM Subject: [Htmlunit-user] 'DomNode has not been set for this SimpleScriptable' error occurs when submit the form Hi, Do you have any idea why this is happening ? It occurs when I call the submitButton's click method, and the HTML form is generated dynamically. Thanks. com.gargoylesoftware.htmlunit.ScriptException: Exception invoking submitat com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:791) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:606) [htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:540) [htmlunit-core-js-2.16-SNAPSHOT.jar:na]at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:723) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:698) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:995) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventListeners(EventListenersContainer.java:193) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:255) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:822) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:756) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.html.HtmlElement$1.run(HtmlElement.java:920) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:606) [htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:540) [htmlunit-core-js-2.16-SNAPSHOT.jar:na]at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:925) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:896) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:111) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.html.HtmlSubmitInput.doClickStateUpdate(HtmlSubmitInput.java:99) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1321) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1268) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1216) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.fenqiguanjia.usercrawler.crawlers.complex.TianMaoFenQiCrawler.tryLoginUser(TianMaoFenQiCrawler.java:211) [classes/:na]at com.fenqiguanjia.usercrawler.crawlers.BaseComplexCrawler.tryLoginUser(BaseComplexCrawler.java:63) [classes/:na]at com.fenqiguanjia.usercrawler.crawlers.BaseCrawler.crawlAccount(BaseCrawler.java:185) [classes/:na]at com.fenqiguanjia.usercrawler.webservices.impl.OrderBillCrawlerWebserviceImpl$1.call(OrderBillCrawlerWebserviceImpl.java:93) [classes/:na]at com.fenqiguanjia.usercrawler.webservices.impl.OrderBillCrawlerWebserviceImpl$1.call(OrderBillCrawlerWebserviceImpl.java:1) [classes/:na]at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_65]at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]Caused by: java.lang.RuntimeException: Exception invoking submitat net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:193) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:452) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1473) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:815) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:111) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.NativeArray.iterativeMethod(NativeArray.java:1609) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.NativeArray.execIdCall(NativeArray.java:338) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.IdFunctionObject.call(IdFunctionObject.java:97) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1473) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:815) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:111) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:430) [htmlunit-core-js-2.16-SNAPSHOT.jar:na]at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) ~[htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3155) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:109) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:716) ~[htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:776) [htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]... 28 common frames omittedCaused by: java.lang.IllegalStateException: DomNode has not been set for this SimpleScriptable: com.gargoylesoftware.htmlunit.javascript.host.html.HTMLFormElementat com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.getDomNodeOrDie(SimpleScriptable.java:149) ~[htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.host.Element.getDomNodeOrDie(Element.java:359) ~[htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement.getDomNodeOrDie(HTMLElement.java:2031) ~[htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at com.gargoylesoftware.htmlunit.javascript.host.html.HTMLFormElement.submit(HTMLFormElement.java:342) ~[htmlunit-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_65]at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_65]at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_65]at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_65]at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:167) ~[htmlunit-core-js-2.16-SNAPSHOT.jar:na]... 44 common frames omitted 2015-03-06 stand4love ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |