You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Linda Morris <Li...@navigon.com> on 2005/02/05 16:26:48 UTC

JMeter has a problem handling a large http response (xml)

Hi all,

I've found jmeter very helpful but I am having some problems.

The webserver that I'm testing returns a large XML stream in response to a HTTP request.  I'm having problems in using the response assertion.

My webserver is in a multi tier system.  Server A sends HTTP GET requests to Server B.  The response is Text/XML. I don't need the xml to be parsed. The returned response is quite large, as seen from the header response Content-Length: 55327857.

JMeter runs the script but no results or errors are returned to the UI. Looking at the JMeter log, I see a java.nio.BufferOverflowException after starting the HTTPSampler as you can see from the log extract below. The webserver shows no errors in the apache logs. So the apache webserver process the requests as expected.

I tried running JMeter in non-gui mode, modified the heap and other memory settings, removed all unnecessary listeners and assertions from my test scripts. Now it is just one http sampler, an Aggregate Report and a Response Assertion with one thread running. Jmeter is running on Windows XP Pro with 1GB of RAM, P4 3Ghz.  

I have a Response Assertion that is to check response for a specified string (an http response header).  I think this is where the problem lies.  If I only check for Response Message or Response Code the assertion works, but I can't test HTTP response headers returned.  I can only verify that Response Code 200 is true.

I assume in this case there is no point in trying to use the text response in the assertion. But I would like to be to test for certain HTTP response headers that are returned, e.g. the server returns headers e.g. Content-Type: text/xml; charset=iso-8859-1.  Is there a way to have an assertion listener process only the http headers and ignore the xml stream or the body of the http response?

Is java.nio.BufferOverflowException a problem that can be fixed or is it a limitation of Jmeter or my configuration? 

Thanks,

Linda

2005/02/04 11:53:25 DEBUG - jmeter.protocol.http.sampler.HTTPSampler:
Start : samplehttp://oslo.local/cgi-bin/RAServer?
points=869413;5010131;1158790;4817301;1210330;4902806;$&des=994293;4979898&his=1337300;5251640;20;30;$&cmd=gate
2005/02/04 11:54:08 DEBUG - jmeter.protocol.http.sampler.HTTPSampler:
End : sample
2005/02/04 11:54:10 ERROR - jmeter.threads.JMeterThread:
java.nio.BufferOverflowException
       at java.nio.charset.CoderResult.throwException(Unknown Source)
       at java.lang.StringCoding$CharsetSD.decode(Unknown Source)
       at java.lang.StringCoding.decode(Unknown Source)
       at java.lang.StringCoding.decode(Unknown Source)
       at java.lang.String.<init>(Unknown Source)
       at java.lang.String.<init>(Unknown Source)
       at org.apache.jmeter.assertions.ResponseAssertion.evaluateResponse(ResponseAssertion.java:266)
       at org.apache.jmeter.assertions.ResponseAssertion.getResult(ResponseAssertion.java:169)
       at org.apache.jmeter.threads.JMeterThread.checkAssertions(JMeterThread.java:401)
       at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:264)
       at java.lang.Thread.run(Unknown Source)