[SOLVED] Error while executing background thread HTTP Refresh Service


all of a sudden, my logs are flooded with the below:
I updated OpenHab to the latest snapshot build, but still this error appears in the logs.
Any help to find the root cause would be appreciated :frowning:

[b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service

java.lang.IllegalArgumentException: json string can not be null or empty

	at com.jayway.jsonpath.internal.Utils.notEmpty(Utils.java:386) [197:com.jayway.jsonpath.json-path:2.1.0]

	at com.jayway.jsonpath.internal.JsonContext.parse(JsonContext.java:81) [197:com.jayway.jsonpath.json-path:2.1.0]

	at com.jayway.jsonpath.JsonPath.read(JsonPath.java:502) [197:com.jayway.jsonpath.json-path:2.1.0]

	at org.eclipse.smarthome.transform.jsonpath.internal.JSonPathTransformationService.transform(JSonPathTransformationService.java:57) [220:org.eclipse.smarthome.transform.jsonpath:]

	at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:65) [233:org.openhab.core.compat1x:]

	at org.openhab.binding.http.internal.HttpBinding.execute(HttpBinding.java:194) [228:org.openhab.binding.http:]

	at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) [233:org.openhab.core.compat1x:]

	at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [233:org.openhab.core.compat1x:]

I assume you are using the HTTP binding? If so I would expect this error if the HTTP request timed out or returned an empty String. Because there is no String to transform, the JSONPATH transform throws an exception.

I don’t think there is a way to solve this except to increase the timeout or make the HTTP service you are polling more reliable.

thanks alot for your quick support! It helped to find the bug.
Yes - I’m using the http binding for various usecases.

The one failing was caused by a direct JasonPath transformation to querry data from a text file, which gets downloaded before. Seems like the download failed or corrupted the file.
I re-initiated a download and now the JasonPath transformation works again.