Bug 51268 - HTTPS request through an invalid proxy causes NullPointerException and does not show in result tree
HTTPS request through an invalid proxy causes NullPointerException and does n...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.4
PC Windows XP
: P2 major (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-05-26 09:10 UTC by Willem Hajenius
Modified: 2011-09-17 00:34 UTC (History)
0 users



Attachments
Test script (.jmx) and log files (4.68 KB, application/binary)
2011-05-26 09:10 UTC, Willem Hajenius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Willem Hajenius 2011-05-26 09:10:11 UTC
Created attachment 27070 [details]
Test script (.jmx) and log files

When performing a HTTPS request through a non-existing proxy server (i.e. there is a value specified, but it's not an actual valid proxy server), JMeter internally gives a NullPointerException and *does not show the (failed) sampler result* in the listeners. As a consequence, the user has no idea that anything went seriously wrong, unless the missing result is noticed.

This can easily be reproduced, please see attached files:
"HTTPS_request.jmx" does a simple HTTPS request and displays the result.

(1) Start JMeter with VALID --proxyHost and --proxyPort parameters
(2) Run the test
(3) You get a green result in the table. This corresponds to attached log "jmeter_with_good_proxy.log"

(4) Start JMeter with INVALID --proxyHost and --proxyPort parameters
(5) Run the test
(6) You get NO result in the table. This corresponds to attached log "jmeter_with_bad_proxy.log" 

I'm using version 2.4 1. As you can see from the log, for an invalid proxy it gives a NullPointerException that bubbles up.
Comment 1 Sebb 2011-05-26 11:07:13 UTC
This looks to be a bug in Java; it should not generate an NPE.
If there is a problem with the proxy, it should report an IOError, which would be handled as a sampler error.

You appear to be using Java version 1.5.0_12 which is quite old.
Does the problem still occur with the latest Java version?
Comment 2 Sebb 2011-05-26 12:17:37 UTC
Even though the NPE should not happen, it's easy enough to allow for it by catching Exception rather than just the expected failures.

URL: http://svn.apache.org/viewvc?rev=1127881&view=rev
Log:
Bug 51268 - HTTPS request through an invalid proxy causes NullPointerException and does not show in result tree.
Rather than delegating to the JMeter thread handler for "unexpected" failures, ensure all Exceptions generate a sample error.

Modified:
   jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
   jakarta/jmeter/trunk/xdocs/changes.xml
Comment 3 Sebb 2011-09-17 00:34:33 UTC
Assuming this is now fixed; if not, please reopen with details.