[Webtest] Re: java.io.IOException :-(

Marc Guillemot webtest@lists.canoo.com
Sun, 02 May 2004 10:40:56 +0200


Hi,

what is the action of the form? May the error caused one time again due to the file protocol that is currently not 
supported by httpunit?

Marc.


Francois LETELLIER wrote:
> Hi,
> 
> I get the following stacktrace when trying a basic script with two 
> <setinputfield> and one <clickbutton>.
> No doc about it :-( ...
> 
> Hint anybody :) ? Thanks.
> 
> [testSpec] ERROR (Step.java:333) - Cannot handle unexpected exception in 
> step ClickButton at /home/flet/build.xml:35:  with (label="Envoyer", 
> stepId="<unknown>", stepType="clickbutton")
>  [testSpec] java.io.IOException
>  [testSpec]     at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:593) 
> 
>  [testSpec]     at 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
>  [testSpec]     at 
> com.meterware.httpunit.HttpWebResponse.readResponseHeader(HttpWebResponse.java:159) 
> 
>  [testSpec]     at 
> com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java:197) 
> 
>  [testSpec]     at 
> com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:53)
>  [testSpec]     at 
> com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:61)
>  [testSpec]     at 
> com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
>  [testSpec]     at 
> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:125)
>  [testSpec]     at 
> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
>  [testSpec]     at 
> com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:141)
>  [testSpec]     at 
> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:127)
>  [testSpec]     at 
> com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
>  [testSpec]     at 
> com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:107)
>  [testSpec]     at 
> com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:245) 
> 
>  [testSpec]     at 
> com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:224) 
> 
>  [testSpec]     at 
> com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:75)
>  [testSpec]     at 
> com.meterware.httpunit.SubmitButton.doButtonAction(SubmitButton.java:47)
>  [testSpec]     at com.meterware.httpunit.Button.click(Button.java:68)
>  [testSpec]     at 
> com.canoo.webtest.steps.request.ClickButton$1.call(ClickButton.java:120)
>  [testSpec]     at 
> com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:106)
>  [testSpec]     at 
> com.canoo.webtest.steps.request.ClickButton.gotoTarget(ClickButton.java:110) 
> 
>  [testSpec]     at 
> com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java:103)
>  [testSpec]     at com.canoo.webtest.steps.Step.execute(Step.java:99)
>  [testSpec]     at 
> com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
>  [testSpec]     at 
> com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:68) 
> 
>  [testSpec]     at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
>  [testSpec]     at org.apache.tools.ant.Task.perform(Task.java:364)
>  [testSpec]     at org.apache.tools.ant.Target.execute(Target.java:301)
>  [testSpec]     at 
> org.apache.tools.ant.Target.performTasks(Target.java:328)
>  [testSpec]     at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1215)
>  [testSpec]     at 
> org.apache.tools.ant.Project.executeTargets(Project.java:1063)
>  [testSpec]     at org.apache.tools.ant.Main.runBuild(Main.java:632)
>  [testSpec]     at org.apache.tools.ant.Main.startAnt(Main.java:183)
>  [testSpec]     at 
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
>  [testSpec]     at 
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
>  [testSpec] Caused by: java.net.UnknownHostException: my
>  [testSpec]     at 
> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>  [testSpec]     at java.net.Socket.connect(Socket.java:452)
>  [testSpec]     at java.net.Socket.connect(Socket.java:402)
>  [testSpec]     at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>  [testSpec]     at 
> sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
>  [testSpec]     at 
> sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
>  [testSpec]     at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
>  [testSpec]     at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
>  [testSpec]     at sun.net.www.http.HttpClient.New(HttpClient.java:339)
>  [testSpec]     at sun.net.www.http.HttpClient.New(HttpClient.java:320)
>  [testSpec]     at sun.net.www.http.HttpClient.New(HttpClient.java:315)
>  [testSpec]     at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512) 
> 
>  [testSpec]     at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489) 
> 
>  [testSpec]     at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617) 
> 
>  [testSpec]     at 
> sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLConnection.java:1490) 
> 
>  [testSpec]     at 
> com.meterware.httpunit.HttpWebResponse.loadHeaders(HttpWebResponse.java:217) 
> 
>  [testSpec]     at 
> com.meterware.httpunit.HttpWebResponse.readHeaders(HttpWebResponse.java:195) 
> 
>  [testSpec]     ... 31 more
> 
> 
> 
> François LETELLIER
> INRIA Rhône-Alpes - ObjectWeb Consortium Executive Committee
> email: francois.letellier at objectweb.org - phone: +33 (0)6 84 64 00 24
> http://www.objectweb.org - ObjectWeb middleware : provide your 
> applications with the kind of freedom they deserve !