1 2 Previous Next 19 Replies Latest reply on Feb 26, 2010 10:57 PM by andrewg Go to original post
      • 15. Re: Upgrade HtmlUnit to 2.7?
        andrewg

        Hi Stan,

         

        No I have not done the HtmlUnit svn build, was going to wait to see if we could get the simple example working first.

         

        As we stand now all the HtmlUnit fix will prove is that the test does not throw the cast exception, it still won't work properly.

        BUT to save you some time I will try to get it done today and post for you. 

         

        Cheers,

        Andrew

        • 16. Re: Upgrade HtmlUnit to 2.7?
          andrewg

          Hi Stan,

           

          Bug you logged with htmlunit http://sourceforge.net/tracker/?func=detail&aid=2952333&group_id=47038&atid=448266 has been fixed and was included in the htmlunit build

           

          build.1687

          Date of build: 02/18/2010 07:39:11

           

          There have since been a number of successful build the latest buid can be found here

           

          http://build.canoo.com/htmlunit/artifacts/

           

          They are calling this htmlunit-2.8-SNAPSHOT.jar I will test this build with my code in the morning (AU EST) and let you know.

           

          Andrew

          • 17. Re: Upgrade HtmlUnit to 2.7?
            ssilvert

            So I tried writing my own RichSuggestionBox test and I got the same result.  It looks like the javascript isn't working so no request is sent to the server.  I found this error in my server log.  Did you find this as well?  (BTW, this was using plain HtmlUnit 2.7)

             

            Feb 24, 2010 4:35:19 PM com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl$ExecutingJobTracker run
            SEVERE: Job run failed with unexpected RuntimeException: Exception invoking jsxGet_text
            ======= EXCEPTION START ========
            Exception class=[java.lang.RuntimeException]
            com.gargoylesoftware.htmlunit.ScriptException: Exception invoking jsxGet_text
                at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:527)
                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:457)
                at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:910)
                at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptFunctionJob.runJavaScript(JavaScriptFunctionJob.java:53)
                at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutionJob.run(JavaScriptExecutionJob.java:76)
                at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl$ExecutingJobTracker.run(JavaScriptJobManagerImpl.java:101)
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                at java.lang.Thread.run(Thread.java:619)
            Caused by: java.lang.RuntimeException: Exception invoking jsxGet_text
                at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:190)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2363)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:328)
                at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:74)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1963)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1503)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1489)
                at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1399)
                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:264)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3157)
                at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
                at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:485)
                at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:450)
                at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:521)
                ... 15 more
            Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 2
                at java.lang.String.substring(String.java:1934)
                at com.gargoylesoftware.htmlunit.html.impl.SimpleRange.append(SimpleRange.java:447)
                at com.gargoylesoftware.htmlunit.html.impl.SimpleRange.toString(SimpleRange.java:437)
                at com.gargoylesoftware.htmlunit.javascript.host.TextRange.jsxGet_text(TextRange.java:75)
                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:164)
                ... 31 more
            Enclosed exception:
            java.lang.RuntimeException: Exception invoking jsxGet_text
                at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:190)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2363)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:328)
                at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:74)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1963)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1503)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1489)
                at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1399)
                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:264)
                at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3157)
                at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
                at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:485)
                at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:450)
                at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:521)
                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:457)
                at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:910)
                at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptFunctionJob.runJavaScript(JavaScriptFunctionJob.java:53)
                at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutionJob.run(JavaScriptExecutionJob.java:76)
                at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl$ExecutingJobTracker.run(JavaScriptJobManagerImpl.java:101)
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                at java.lang.Thread.run(Thread.java:619)
            Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 2
                at java.lang.String.substring(String.java:1934)
                at com.gargoylesoftware.htmlunit.html.impl.SimpleRange.append(SimpleRange.java:447)
                at com.gargoylesoftware.htmlunit.html.impl.SimpleRange.toString(SimpleRange.java:437)
                at com.gargoylesoftware.htmlunit.javascript.host.TextRange.jsxGet_text(TextRange.java:75)
                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:164)
                ... 31 more
            == CALLING JAVASCRIPT ==

             

              function () {
                  return A.apply(B, C.concat($A(arguments)));
              }

             

            ======= EXCEPTION END ========

            • 18. Re: Upgrade HtmlUnit to 2.7?
              andrewg
              Hi Stan,

               

              I get a similar error when using htmlunit 2.7

               

               

              Exception invoking jsxFunction_send

              ======= EXCEPTION START  ========
              Exception class=[java.lang.RuntimeException]
              com.gargoylesoftware.htmlunit.ScriptException:  Exception invoking jsxFunction_send
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:527)
              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:457)
              at  com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:910)
              at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:190)
              at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:209)
              at  com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:645)
              at  com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:887)
              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:892)
              at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1248)
              at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1212)
              at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1179)
              at  org.jboss.jsfunit.jsfsession.JSFClientSession.click(JSFClientSession.java:225)
              at  tk.glover.jsfUnitTest.test.suggestion.A002_TestOnModalPanel.testSuggestionOnModalPanel(A002_TestOnModalPanel.java:50)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at  org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
              at  org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
              at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
              at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
              at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
              at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
              at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
              at  org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
              at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
              at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
              at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
              at  org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
              at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              at  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at  org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
              at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at  org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at  org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
              at  org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
              at  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at  org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at  org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at  org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at  org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              at  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at  org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
              at  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
              at  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:619)
              Caused by:  java.lang.RuntimeException: Exception invoking jsxFunction_send
              at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:190)
              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:264)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3157)
              at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
              at  com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80)
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:485)
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:450)
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:521)
              ... 82 more
              Caused by: java.lang.RuntimeException: Exception  invoking jsxGet_responseXML
              at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:190)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2363)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:328)
              at  com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:74)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.get(XMLHttpRequest.java:547)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1963)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1526)
              at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1393)
              at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
              at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:485)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.setState(XMLHttpRequest.java:171)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.doSend(XMLHttpRequest.java:498)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxFunction_send(XMLHttpRequest.java:431)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:164)
              ... 94 more
              Caused by: java.lang.ClassCastException:  com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to  com.gargoylesoftware.htmlunit.html.HtmlPage
              at  com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:92)
              at  com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1836)
              at  com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:845)
              at  com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:423)
              at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:303)
              at  com.gargoylesoftware.htmlunit.html.BaseFrame.<init>(BaseFrame.java:71)
              at  com.gargoylesoftware.htmlunit.html.HtmlInlineFrame.<init>(HtmlInlineFrame.java:48)
              at  com.gargoylesoftware.htmlunit.html.DefaultElementFactory.createElementNS(DefaultElementFactory.java:231)
              at  com.gargoylesoftware.htmlunit.xml.XmlUtil.createFrom(XmlUtil.java:153)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:209)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at  com.gargoylesoftware.htmlunit.xml.XmlUtil.appendChild(XmlUtil.java:142)
              at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:114)
              at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:72)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxGet_responseXML(XMLHttpRequest.java:279)
              at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown Source)
              at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:164)
              ... 112 more
              Enclosed exception:
              java.lang.RuntimeException:  Exception invoking jsxFunction_send
              at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:190)
              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:264)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3157)
              at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
              at  com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80)
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:485)
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:450)
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:521)
              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:457)
              at  com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:910)
              at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:190)
              at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:209)
              at  com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:645)
              at  com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:887)
              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:892)
              at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1248)
              at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1212)
              at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1179)
              at  org.jboss.jsfunit.jsfsession.JSFClientSession.click(JSFClientSession.java:225)
              at  tk.glover.jsfUnitTest.test.suggestion.A002_TestOnModalPanel.testSuggestionOnModalPanel(A002_TestOnModalPanel.java:50)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at  org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
              at  org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
              at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
              at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
              at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
              at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
              at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
              at  org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
              at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
              at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
              at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
              at  org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
              at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              at  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at  org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
              at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at  org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at  org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
              at  org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at  org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
              at  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at  org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at  org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at  org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at  org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              at  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at  org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
              at  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
              at  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:619)
              Caused by:  java.lang.RuntimeException: Exception invoking jsxGet_responseXML
              at   net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:190)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2363)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:328)
              at  com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:74)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.get(XMLHttpRequest.java:547)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1963)
              at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1526)
              at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1393)
              at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
              at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
              at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:485)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.setState(XMLHttpRequest.java:171)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.doSend(XMLHttpRequest.java:498)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxFunction_send(XMLHttpRequest.java:431)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:164)
              ... 94 more
              Caused by: java.lang.ClassCastException:  com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to  com.gargoylesoftware.htmlunit.html.HtmlPage
              at  com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:92)
              at  com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1836)
              at  com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:845)
              at  com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:423)
              at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:303)
              at  com.gargoylesoftware.htmlunit.html.BaseFrame.<init>(BaseFrame.java:71)
              at  com.gargoylesoftware.htmlunit.html.HtmlInlineFrame.<init>(HtmlInlineFrame.java:48)
              at  com.gargoylesoftware.htmlunit.html.DefaultElementFactory.createElementNS(DefaultElementFactory.java:231)
              at  com.gargoylesoftware.htmlunit.xml.XmlUtil.createFrom(XmlUtil.java:153)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:209)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
              at  com.gargoylesoftware.htmlunit.xml.XmlUtil.appendChild(XmlUtil.java:142)
              at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:114)
              at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:72)
              at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxGet_responseXML(XMLHttpRequest.java:279)
              at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown Source)
              at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:164)
              ... 112 more
              == CALLING JAVASCRIPT ==
              function () {
              [native  code, arity=0]

               

               

               

              cheers, Andrew

              • 19. Re: Upgrade HtmlUnit to 2.7?
                andrewg

                Continued from my post above when I run my tests with htmlunit 2.8 I don't get an error BUT the event is still not triggered.

                 

                ATLEAST I can write my tests now and manually fill in all the fields, the ideal would be to get the event to be triggered though.

                 

                All the deps for 2.8 are the same as 2.7 so you can just drop the jar in.

                 

                Andrew

                1 2 Previous Next