[SOLVED] Snapshots #1715, 1716, 1717, 1718, 1719, 1720, 1721- restdocs (Rest API) errors

Snapshot users know to look here. The rest of us use search :wink:

@marcel_erkel
@vzorglub
@Bruce_Osborne

In my case I found out now:

When I install Openhab as Windows Service, then the restdocs error appears immediately!

When I’ve used only start.bat before, then the following bindings were running:

package = standard
binding = astro,hue
ui = paper,basic,habpanel,restdocs,homebuilder,habmin
persistence = rrd4j
transformation = map,javascript,jsonpath

And there is no chance to revert it. I’ve uninstalled wrapper and oh2 service. Same error!

EDIT: It was not caused by installation of OpenHab Service, it was installation of jsonpath that causes the errors. But the error appears only after installing another addon.

File an issue on GitHub

I’m going to do so, but after I did some further investigations!

Unfortunately, my further tests have not brought any new findings. It probably depends on the right order, which binding, UI, transformation or misc one chooses. Sometimes the restdocs work and sometimes not.

I’m going to do further investigations until I’ll find the reason or the correct order.

Hello folks,

here are my results:

Here are the bindings,UIs,transformations,miscs that do NOT BREAK restdocs:

binding = allplay,amazondashbutton,astro,avmfritz,feed,harmonyhub,http1,hue,knx,max,ntp,openweathermap,pioneeravr,sonos,tplinksmarthome,weather1,zigbee,zwave
ui = basic,classic,habmin,habpanel,homebuilder,paper,restdocs
persistence = rrd4j
transformation = javascript,map,regex
voice = googletts,marytts
misc = ruleengine,market,openhabcloud

.
.

BREAKING the restdocs:

binding= boschindego,chromecast,groheondus
transformation= jinja,jsonpath
voice = pollytts

.
restdocs is installing also:

211 │ Active │  80 │ 2.4.5                 │ Jackson-annotations
212 │ Active │  80 │ 2.4.5                 │ Jackson-core
213 │ Active │  80 │ 2.4.5                 │ jackson-databind
214 │ Active │  80 │ 2.4.5                 │ Jackson-dataformat-YAML

.
chromecast INSTALLATION:

first uninstalls:

211 │ Active │  80 │ 2.4.5                 │ Jackson-annotations
213 │ Active │  80 │ 2.4.5                 │ jackson-databind

also installs:

225 │ Active │  80 │ 2.9.9                 │ Jackson-annotations
226 │ Active │  80 │ 2.9.9                 │ Jackson-core
227 │ Active │  80 │ 2.9.9                 │ jackson-databind

.
boschindego INSTALLATION:

also installs:

304 | Active |  80 | 2.9.9                 | Jackson-annotations
305 | Active |  80 | 2.9.6                 | Jackson-core
306 | Active |  80 | 2.9.9                 | jackson-databind

.
groheondus INSTALLATION:

also installs:

309 | Active |  80 | 2.9.9                 | Jackson-annotations
310 | Active |  80 | 2.9.6                 | Jackson-core
311 | Active |  80 | 2.9.9                 | jackson-databind

.
jinja INSTALLATION:

also installs:

318 | Active |  80 | 2.9.9                 | Jackson-annotations
319 | Active |  80 | 2.9.6                 | Jackson-core
320 | Active |  80 | 2.9.9                 | jackson-databind

.
pollytts INSTALLATION:

also installs:

336 | Active |  80 | 2.9.9                 | Jackson-annotations
337 | Active |  80 | 2.9.9                 | Jackson-core
338 | Active |  80 | 2.9.9                 | jackson-databind
339 | Active |  80 | 2.9.9                 | Jackson dataformat: CBOR

.
.

jsonpath INSTALLATION:

also installs:

263 | Active |  80 | 2.9.9                 | Jackson-annotations

.
Installation of jsonpath does not break restdocs immediately, but after installing any other addon.

EDIT: I have not tested any other bindings than the ones above. Maybe there are even more that break the restdocs.

EDIT2: chromecast breaks restdocs immediately, the others (boschindego,groheondus, jinja,jsonpath,pollytts) breaks restdocs after installing any other addon.

I guess all addons with this feature dependency are all breaking restdocs: openhab.tp-jackson

See here!!!
Link to github!

And chromecast breaks it immediately while using this bom.xml

<dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.9.9</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>2.9.9</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.9.9</version>
      <scope>compile</scope>
    </dependency>
5 Likes

Fantastic work!!
Jsonpath breaks it!! That’s a bummer. I was wiling to disable a binding or two if I didn’t loose too much functionality but I can’t disable Jsonpath. Too much relies on it.

I eould suggest adding your finding to the gitHub thread

1 Like

Done, see here.

2 Likes

As a workaround you first install all other addons and as the very last one: jsonpath

Keep in mind, that installations of any further addon will break restdocs then.

You could do as follows: uninstall jsonpath, install your desired new addon(s), install jsonpath again.

Sadly I tried uninstalling the jsonpath add-on and the rest docs still do not work. I don’t use Chromecast or Pollytts.

However, a restart of oh cleared that up. Then I reinstalled jsonpath and rest continues to be well. Thanks for figuring this out!

1 Like

@rlkoshak
Rich
I am not clear what sequence you followed from your post. I can live without Chromecast for a while. Thanks

Alex… excellent job!!!
I saw you updated the git hub thread with your new info. Hopefully now the developer can find the root cause of the issue. The entire community is appreciative of your hard work :+1:

1 Like

@J-N-K @cweitkamp

Do you know all about this? See above, in this post.

Hi @Celaeno1,

Thank you for all the details. I was not aware of all of them. I am wondering about two facts:

  1. Why do some bindings still install Jackson-core dependency version 2.9.6. Even if they are using openhab-tp.jackson feature which provides version 2.9.9 for all Jackson bundles.

  2. Why does e.g. Jsonpath only install Jackson-annotations? It depends on openhab-tp.jackson too.

// EDIT: Answer for 1.: Maybe the same cause @rlkoshak is talking about.

I can answer 2.: the bundles of the feature are defined as dependency="true", so they are only installed if needed. If you want to make sure that they are installed, you need to remove that.

See https://github.com/openhab/openhab-core/pull/1128

1 Like

:rofl: Just scrolling through the docs of Jayway JsonPath the dependency on Jackson is optional because it is shipped with five different JsonProviders - Jackson is one of them (see SPI section). The binding currently uses default JsonSmart but it imo would make much more sense to switch to Gson.

2 Likes

Short heads-up: The Jackson dependency in Jsonpath has been removed. For the remaining five bundles we need a different solution - maybe the fix submitted by @J-N-K. They all use external libraries which depend on Jackson.

1 Like

I can confirm, that in Snapshot 1725 there are no 2.9.9 | Jackson-annotations installed,

while restdocs and jsonpath are installed. Restdocs are still running after installation of another addon after jsonpath was installed.
.

206 | Active |  80 | 2.4.5                 | Jackson-annotations
207 | Active |  80 | 2.4.5                 | Jackson-core
208 | Active |  80 | 2.4.5                 | jackson-databind
...
240 | Active |  80 | 2.5.0.201910120922    | openHAB UI :: Bundles :: openHAB REST API Documentation
...
243 | Active |  75 | 2.5.0.201910150541    | openHAB Add-ons :: Bundles :: Transformation Service :: JSonPath
244 | Active |  80 | 1.14.0.201910150438   | openHAB HTTP Binding

Thanks a lot :slight_smile:

1 Like

FYI:

It (going to Jackson 2.9.10) has been merged:

I’m really looking forward to the next snapshot. :slight_smile:

I’ve installed Snapshot #1728 now.

The following is running again:

jsonpath, chromecast, restdocs

All others (see post above) I did not test.

and the following tp-features are installed now:

208 | Active |  80 | 2.9.10                | Jackson-annotations
209 | Active |  80 | 2.9.10                | Jackson-core
210 | Active |  80 | 2.9.10                | jackson-databind

@J-N-K Thanks a lot :slight_smile:

EDIT: Installation of boschindego, groheondus,jinja also were successful! But I cannot test them…

2 Likes