You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by br...@bt.com on 2012/11/20 11:40:44 UTC

Trouble sending HTTP request with POST variable

Hello,

I am trying to load test a java servlet that fetches records from an archive database.

The servlet works as follows:

1-Reads in post variables from HTTP header
2-Uses variables to query database
3-Returns XML


I have setup a test which I want to fire off HTTP requests with post variables however the test is not working, getting errors with J Meter.

Screenshot 1 - Shows the structure of the test

[cid:image001.png@01CDC70B.7B16EC80]

Screenshot 2 - Shows the CSV file I am reading from

[cid:image002.png@01CDC70B.7B16EC80]

I have placed the CSV file in the same folder that my test plan is saved in!

Screenshot 3 - Shows the HTTP request

[cid:image003.png@01CDC70B.7B16EC80]



This is the error output:
Thread Name: Thread Group 1-1
Sample Start: 2012-11-20 10:35:27 GMT
Load time: 0
Latency: 0
Size in bytes: 1113
Headers size in bytes: 0
Body size in bytes: 1113
Sample Count: 1
Error Count: 1
Response code: Non HTTP response code: java.net.URISyntaxException
Response message: Non HTTP response message: Expected closing bracket for IPv6 address at index 13: http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/

Response headers:


HTTPSampleResult fields:
ContentType:
DataEncoding: null


POST Request

POST http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/

POST data:


[no cookies]

Response DATA
java.net.URISyntaxException: Expected closing bracket for IPv6 address at index 13: http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/
        at java.net.URI$Parser.fail(Unknown Source)
        at java.net.URI$Parser.failExpecting(Unknown Source)
        at java.net.URI$Parser.parseServer(Unknown Source)
        at java.net.URI$Parser.parseAuthority(Unknown Source)
        at java.net.URI$Parser.parseHierarchical(Unknown Source)
        at java.net.URI$Parser.parse(Unknown Source)
        at java.net.URI.<init>(Unknown Source)
        at java.net.URL.toURI(Unknown Source)
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:232)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064)
        at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
        at java.lang.Thread.run(Unknown Source)











Please help!

Thanks