7 Replies Latest reply on May 12, 2010 5:09 AM by Greg Cousin

    SuggestionBox JSFUnit 1.2 Exception invoking jsxFunction_send

    Greg Cousin Newbie

      Hi everybody!

      I used JSFUnit for 1 year. It's great library!

      I have a problem with a JSFUnit test on a RichFace suggestionBox. I got this error :

      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.executeEventListeners(EventListenersContainer.java:159)

      at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:216)

      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  fr.ipsofacto.smiles.test.NavigatorJSFUnit.click(NavigatorJSFUnit.java:127)

      at  fr.ipsofacto.smiles.test.SocieteTest.testSocieteAjoutContact(SocieteTest.java:317)

      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:734)

      at  javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

      at  org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)

      at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)

      at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)

      at  org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)

      at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)

      at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)

      at  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)

      at  org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)

      at  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)

      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)

      at  com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)

      at  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)

      at  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)

      at  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)

      at  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)

      at  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)

      at  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)

      at  org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)

      at  com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)

      at  com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(CometEngine.java:609)

      at  com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:356)

      at  com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:84)

      at  com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)

      at  com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)

      at  com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)

      at  com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)

      at  com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

      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.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)

      ... 71 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)

      ... 82 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.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.GeneratedMethodAccessor685.invoke(Unknown Source)

      at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:164)

      ... 100 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.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.executeEventListeners(EventListenersContainer.java:159)

      at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:216)

      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  fr.ipsofacto.smiles.test.NavigatorJSFUnit.click(NavigatorJSFUnit.java:127)

      at  fr.ipsofacto.smiles.test.SocieteTest.testSocieteAjoutContact(SocieteTest.java:317)

      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:734)

      at  javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

      at  org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)

      at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)

      at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)

      at  org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)

      at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)

      at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)

      at  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)

      at  org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)

      at  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)

      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)

      at  com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)

      at  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)

      at  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)

      at  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)

      at  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)

      at  org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)

      at  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)

      at  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)

      at  org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)

      at  com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)

      at  com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(CometEngine.java:609)

      at  com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:356)

      at  com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:84)

      at  com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)

      at  com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)

      at  com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)

      at  com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)

      at  com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

      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)

      ... 82 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.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.GeneratedMethodAccessor685.invoke(Unknown Source)

      at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:164)

      ... 100 more

      == CALLING JAVASCRIPT ==

       

      function (event) {

      if (!Event || !Event.extend || (event.eventName &&  event.eventName != eventName)) {

      return false;

      }

      Event.extend(event);

      handler.call(element, event);

      }

       

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

       

      I tried to switch from JSFUnit 1.1 to 1.2. I read before this discussion http://community.jboss.org/thread/147729?tstart=0

      and I also switched to HTMLUnit 2.8 SNAPSHOT (the build 1719) but now i got this error:

      java.lang.AbstractMethodError:  org.jboss.jsfunit.framework.JSFUnitWebConnection.getResponse(Lcom/gargoylesoftware/htmlunit/WebRequest;)Lcom/gargoylesoftware/htmlunit/WebResponse;

       

      I don't understand what happen. I made the same test manually and everything was ok.So, i think there is something wrong with JSFUnit or HTMLUnit 2.7 / 2.8(build 1719). Following is my library list  :

      ant-1.5.4.jar
      aspectjrt-1.2.1.jar
      cactus-13-1.7.1.jar
      cactus-ant-13-1.7.1.jar
      cargo-0.5.jar
      commons-codec-1.4.jar
      commons-collections-3.2.1.jar
      commons-httpclient-3.1.jar
      commons-io-1.4.jar
      commons-lang-2.4.jar
      commons-logging-1.1.1.jar
      cssparser-0.9.5.jar
      htmlunit-2.7.jar
      htmlunit-core-js-2.7.jar
      jboss-jsfunit-analysis-1.2.0.Final.jar
      jboss-jsfunit-ant-1.2.0.Final.jar
      jboss-jsfunit-core-1.2.0.Final.jar
      jboss-jsfunit-richfaces-1.2.0.Final.jar
      junit-3.8.1.jar
      nekohtml-1.9.14.jar
      sac-1.3.jar
      serializer-2.7.1.jar
      xalan-2.7.1.jar
      xercesImpl-2.9.1.jar
      xml-apis-1.3.04.jar

       

      Thanks for your help.