You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "zapdoskit1 (via GitHub)" <gi...@apache.org> on 2025/06/17 09:40:51 UTC
Re: [I] ZooKeeperClusterService does not work with Blueprint in Karaf [camel-karaf]
zapdoskit1 commented on issue #594:
URL: https://github.com/apache/camel-karaf/issues/594#issuecomment-2979673105
Found that this issue is related to https://github.com/apache/curator/issues/960.
Now my solution is to replace these curator jar files for camel-zookeeper manually:
- curator-client https://repo1.maven.org/maven2/org/apache/curator/curator-client/5.7.1/
- curator-framework https://repo1.maven.org/maven2/org/apache/curator/curator-framework/5.7.1/
- curator-recipes https://repo1.maven.org/maven2/org/apache/curator/curator-recipes/5.7.1/
- curator-x-discovery https://repo1.maven.org/maven2/org/apache/curator/curator-x-discovery/5.7.1/
in \apache-karaf-4.4.7\system\org\apache\curator
change these jar files from normal .jar version to -osgi.jar version, and rename it to .jar
e.g.
> rename existing curator-client-5.7.1.jar -> curator-client-5.7.1.jar.bak
download [curator-client-5.7.1-osgi.jar](https://repo1.maven.org/maven2/org/apache/curator/curator-client/5.7.1/curator-client-5.7.1-osgi.jar)
rename curator-client-5.7.1-osgi.jar -> curator-client-5.7.1.jar
place it in \apache-karaf-4.4.7\system\org\apache\curator\curator-client\5.7.1
After complete all 4 curator jar files and restart karaf, the exception
`java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/apache/curator/shaded/com/google/common/cache/CacheLoader`
is gone, and another exception occurs:
`java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: io/netty/handler/ssl/SslContext`
which can be solved by adding these `io.netty` library that are required from camel-zookeeper https://mvnrepository.com/artifact/org.apache.camel/camel-zookeeper/4.10.3:
```
<bundle>mvn:io.netty/netty-handler/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-transport-native-epoll/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-tcnative-boringssl-static/2.0.72.Final</bundle>
<bundle>mvn:io.netty/netty-tcnative-classes/2.0.72.Final</bundle>
<bundle>mvn:io.netty/netty-common/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-resolver/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-buffer/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-transport/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-transport-native-unix-common/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-codec/4.1.122.Final</bundle>
```
Finally, my blueprint test.xml feature for camel 4 is updated to:
```
...
<!-- https://mvnrepository.com/artifact/org.apache.camel.karaf/apache-camel -->
<repository>mvn:org.apache.camel.karaf/apache-camel/4.10.3/xml/features</repository>
<feature name="camel" description="camel 4.10.3 support" version="4.10.3">
<bundle>mvn:io.netty/netty-handler/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-transport-native-epoll/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-tcnative-boringssl-static/2.0.72.Final</bundle>
<bundle>mvn:io.netty/netty-tcnative-classes/2.0.72.Final</bundle>
<bundle>mvn:io.netty/netty-common/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-resolver/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-buffer/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-transport/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-transport-native-unix-common/4.1.122.Final</bundle>
<bundle>mvn:io.netty/netty-codec/4.1.122.Final</bundle>
<feature>camel</feature>
<feature>camel-jms</feature>
<feature>camel-http</feature>
<feature>camel-zookeeper</feature>
<feature>camel-jetty</feature>
<feature>camel-velocity</feature>
<feature>camel-ftp</feature>
</feature>
```
and now it can use blueprint with camel 4 `ZooKeeperClusterService` and `ClusteredRoutePolicy` in jdk17...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org