Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tellstick] Fixes a NoClassDefFoundError that caused the Tellstick addon to not work properly #9634

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
/bundles/org.openhab.binding.tankerkoenig/ @dolic @JueBag
/bundles/org.openhab.binding.telegram/ @ZzetT
/bundles/org.openhab.binding.teleinfo/ @Nokyyz
/bundles/org.openhab.binding.tellstick/ @jarlebh
/bundles/org.openhab.binding.tellstick/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.tesla/ @kgoderis
/bundles/org.openhab.binding.tibber/ @kjoglum
/bundles/org.openhab.binding.tivo/ @mlobstein
Expand Down
24 changes: 21 additions & 3 deletions bundles/org.openhab.binding.tellstick/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<properties>
<bnd.importpackage>!com.luckycatlabs.*,!com.jcraft.jzlib.*,!org.apache.commons.cli.*,!org.eclipse.swt.*</bnd.importpackage>
<dep.noembedding>netty-transport-native-unix-common,netty-common,netty-transport,netty-transport-native-epoll,netty-buffer,netty-resolver,netty-codec,netty-codec-http,netty-handler</dep.noembedding>
<dep.noembedding>netty-transport-native-unix-common,netty-common,netty-transport,netty-transport-native-epoll,netty-buffer,netty-resolver,netty-codec,netty-codec-http,netty-handler,netty-transport-native-kqueue,netty-handler-proxy,netty-codec-socks</dep.noembedding>
</properties>

<dependencies>
Expand All @@ -36,13 +36,13 @@
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>2.0.19</version>
<version>2.10.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-netty-utils</artifactId>
<version>2.0.19</version>
<version>2.10.4</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -105,6 +105,24 @@
<version>4.1.42.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>4.1.42.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler-proxy</artifactId>
<version>4.1.42.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-socks</artifactId>
<version>4.1.42.Final</version>
<scope>compile</scope>
</dependency>
Comment on lines +108 to +125
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you including these dependencies in the binding jar if they are already included in the runtime environment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are new dependencies required by the new version of async-http-client.
As far I can tell these are not already included by the openhab.tp-netty feature so I had to add them here specifically.
Not all Netty dependencies are included in that feature and my guess is that only the most used once have been added there so far.
My understanding of the build system is very limited so far by I think I found the openhab.tp-netty definition in this file openhab-core\features\karaf\openhab-tp\src\main\feature\feature.xml. Currently on line 120.
There the included Netty dependencies can be found and they are; netty-buffer, netty-common, netty-codec, netty-codec-http, netty-codec-mqtt, netty-handler, netty-resolver, netty-transport, netty-transport-native-epoll and netty-transport-native-unix-common.

I am quite sure that it will work as well if we add these three dependencies, that I need, to the openhab.tp-netty feature instead but I guess that that will impact all other addons that rely on that feature and it would require a change in the openhab-core. That works for me but as I am unsure of the impact of such a change I think someone with a better knowledge of the build/feature/dependency setup should make that call.

<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<feature dependency="true">openhab.tp-jaxb</feature>
<bundle dependency="true">mvn:net.java.dev.jna/jna/4.5.2</bundle>
<bundle dependency="true">mvn:net.java.dev.jna/jna-platform/4.5.2</bundle>
<bundle dependency="true">mvn:io.netty/netty-transport-native-kqueue/4.1.42.Final</bundle>
<bundle dependency="true">mvn:io.netty/netty-handler-proxy/4.1.42.Final</bundle>
<bundle dependency="true">mvn:io.netty/netty-codec-socks/4.1.42.Final</bundle>
<bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.2.1/1.2.1_2</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.tellstick/${project.version}</bundle>
</feature>
</features>