Bug 59845

Summary: JSONPostProcessor should not log an error level message for JSON elements not being found
Product: JMeter - Now in Github Reporter: Justin McCartney <be_strew>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Justin McCartney 2016-07-12 09:05:16 UTC
The Response JSON extractor logs a message at ERROR level if the specified JSON path expression cannot be found.

For example:

2016/07/12 09:44:16 ERROR - jmeter.extractor.json.jsonpath.JSONPostProcessor: Error processing JSON content in Response Json Extractor, message:No results for path: $['companyId']

I believe that this should not be even an INFO level message.  Consider the XPathExtractor which logs no message for a element that is missing or cannot be found.

As the JSONPostProcessor also sets the variable to a specific default value if it cannot be found I feel the log message should be moved to debug level logging.

This is causing our logs to be spammed with false "errors" when in fact the server has failed to respond under load and therefore the json element will not be present.
Comment 1 Felix Schumacher 2016-07-12 17:11:54 UTC
Date: Tue Jul 12 17:11:08 2016
New Revision: 1752317

URL: http://svn.apache.org/viewvc?rev=1752317&view=rev
Log:
Log messages about JSON Path mismatches at debug level instead of error.

Bugzilla Id: 59845

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONManager.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 The ASF infrastructure team 2022-09-24 20:38:04 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4022