streamx
streamx copied to clipboard
`NoSuchMethodError` on Kafka 0.11.0.0
I have the following configuration:
OS: OS X Sierra Java: 1.8.0_131 Kafka: 0.11.0.0 installed via Brew
I've compiled streamx off of master. I'm trying to run the connector in standalone and I see the following error:
$ ./bin/connect-standalone.sh config/connect-standalone.properties /Users/<username>/dev/noodle/streamx/config/quickstart-s3.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/<username>/dev/noodle/streamx/target/streamx-0.1.0-SNAPSHOT-development/share/java/streamx/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/kafka/0.11.0.0/libexec/libs/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;
at org.reflections.Reflections.expandSuperTypes(Reflections.java:380)
at org.reflections.Reflections.<init>(Reflections.java:126)
at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoader.java:221)
at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:198)
at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader.java:159)
at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:47)
at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:68)
Any thoughts?
I'd be willing to bet there were breaking changes in Kafka between 0.11.0.0 and 0.10. Moving to Guava 20.0 fixes this issue:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
There are a whole new set of issues that prevent the connector from starting up properly however.
The additional errors I was seeing were indeed due to the fact that this was compiled against Kafka 0.10. I merged in the HDFS 3.3.0 connector, which is compiled against Kafka 0.11, and everything's working. I'll open a pull request.