[Solved]Getting a NPE from a https-request

I’m using a HTTPS-request in a rule like:

var String URL= “https://creativecommons.tankerkoenig.de/json/prices.php?ids=” + Tankstelle1_ID + “,” +Tankstelle2_ID + “,” + Tankstelle3_ID + “&apikey=” + API_Key
var String json = sendHttpGetRequest(URL)

which is raising the following error:

17:57:50.064 [ERROR] [lipse.smarthome.io.net.http.HttpUtil] - Fatal transport error: java.util.concurrent.ExecutionException: java.lang.NullPointerException

I did put in the start-ssl certificates in the jre/lib/security folder.

The output of the above https request, pasted into the browser (with the correct IDs) return the expected JSON-string.
What could be the cause of that error?

Could you log the URL you construct here to make sure it is what you expect it to be?

By saying " [quote=“opus, post:1, topic:13610”]
The output of the above https request, pasted into the browser (with the correct IDs) return the expected JSON-string
I tried to state exact that.

I’m running a manual installation of the snapshot Build #456, using bindings Intertechno and HTTP (coming to think of it, HTTP isn’t needed if I only use the posted rule for http-requests)
Hardware Raspbery 2


I have a similar issue. I try to get the following URL in a rule:

My log:
2016-08-28 22:34:20.696 [ERROR] [lipse.smarthome.io.net.http.HttpUtil] - Fatal transport error: java.util.concurrent.ExecutionException: java.lang.NullPointerException

My environment:

  • OH2 : 2.0.0-SNAPSHOT - Build #456
  • HTTP binding: org.openhab.binding.http-1.9.0-20160825.010928-150.jar

It’s possible that there is a relationship between this PR (merged 11 August) and the error you are seeing.

Definitely yes. I created https://github.com/eclipse/smarthome/issues/2059 for it.

The issue should be fixed in the latest distro #459 - please test and report back!

1 Like

No news is hopefully good news :slight_smile:

I’m sorry. You reported that around midnight ( guess what I did at that time ). And now it is 16 houses laterI’m just ready to leave office. I will report back today

Too bad,I still have to go to work

guess what I did at that time

Same as me? Fixing openHAB issues? Cool :sunglasses:

No worries, take your time with testing as long as the result is positive!

Excuse me, if I did sound to harsh in my last reply.

Installed last nigthly #462, running the rule with the “senHttpGetRequest” as above, getting the same error.
Did I do something wrong?
Could my update process be wrong (copied from docs/openhab2)?

What “log:set” should I use to take a deeper look?

[edit:] Error is showing with and without the " Circular reference detected, getService returning null" Error, which is coming during most startups.

Removing the not needed Http-binding seemed to do the trick. I would say RESOLVED.
But, why is the Http-binding causing this different behaviour?

No worries, you did not!

Is this on a FRESH installation? As soon as you install the http binding, the http rule action does not work anymore…?

I’m sorry, but I can’t say it for this sequence. Stupid me installed the Http binding (without any Http request for that binding) before loading the rule with the Https request.

(Re)Loaded the Http-Binding into the working setup. After taht Https-Requests in the rule did show the error:

20:20:27.619 [ERROR] [lipse.smarthome.io.net.http.HttpUtil] - Fatal transport error: java.util.concurrent.TimeoutException

Removed the Binding and everything worked again.

Thanks for the help!

My issue seems fixed in 2.0.0-SNAPSHOT - Build #474 (with HTTP binding org.openhab.binding.http-1.9.0-20160909.010927-153.jar).

Thanks !