Comments (6)
It sounds like the Avro serializer library has a transitive dependency on Curator. Try adding an exclusion rule to the dependency declaration.
from kafka-junit.
Do you have a working example? I'm not sure how to do that. I think that's something that should be documented on your front page as well because I'm sure other people will encounter that issue.
And I don't see Curator here unfortunately :(
mvn dependency:tree
[INFO] +- io.confluent:kafka-avro-serializer:jar:3.3.0:compile
[INFO] | +- org.apache.avro:avro:jar:1.8.2:compile
[INFO] | | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | | +- com.thoughtworks.paranamer:paranamer:jar:2.7:compile
[INFO] | | +- org.xerial.snappy:snappy-java:jar:1.1.1.3:compile
[INFO] | | +- org.apache.commons:commons-compress:jar:1.8.1:compile
[INFO] | | \- org.tukaani:xz:jar:1.5:compile
[INFO] | +- io.confluent:kafka-schema-registry-client:jar:3.3.0:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.4:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.4:compile
[INFO] | | \- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
[INFO] | | \- log4j:log4j:jar:1.2.17:compile
[INFO] | +- io.confluent:common-config:jar:3.3.0:compile
[INFO] | \- io.confluent:common-utils:jar:3.3.0:compile
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.8:compile
[INFO] | | +- jline:jline:jar:0.9.94:compile
[INFO] | | \- io.netty:netty:jar:3.7.0.Final:compile
[INFO] | \- com.101tec:zkclient:jar:0.10:compile
from kafka-junit.
I think the issue is that you're targetting curator-test 4.0.0. This dependency is on Zookeeper 3.5.x, which is not the zookeeper supported by Kafka.
Maybe try downgrading to curator-test 2.12.0
, which supports Zookeeper 3.4.x?
from kafka-junit.
Ah, it must be the transitive dependency on Zookeeper. Try excluding that from the Avro dependency.
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>3.3.0</version>
<exclusions>
<exclusion>
<groupId>org.apache</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
</exclusions>
</dependency>
I'd rather not downgrade Curator now because it could cause a lot of existing code to break.
from kafka-junit.
According to https://mvnrepository.com/artifact/org.apache.curator/curator-test
2.12 and 3.3.0 were both released in March 2017.
2.12 targets zookeeper 3.4.x, the branch Kafka uses.
3.3.0 targets zookeeper 3.5.x, currently in beta and not working with Kafka
It seems curator-test was upgraded to 4.0.0 as part of this commit: 89bfeed Although I'm not sure if there's any reason why it has.
Bottom line, I believe downgrading to 2.12 is both safer and more sound based on matching the kafka zookeeper client version. It also prevents projects onboarding this library from having zookeeper clients in version beta 3.5.x, which could be a serious risk
In #30 Jenkins tested the project itself and it passes its own test suite, which is a pretty good indication the downgrade shouldn't break anything
I think it's still time to make a good decision for this project to follow the 2.x branch of curator-test. If you don't agree with me that's fine I won't insist :) Hope you understand my point of view
from kafka-junit.
It's been a while so I can't remember the reason for the upgrade. My fear is that the 3.x version has been out for a long time and by suddenly downgrading one of the dependencies, I could break existing code that may be accidentally (or, indeed, intentionally) relying on it. As this is a minor dependency conflict with a supporting Kafka library, I don't feel like a downgrade is justified here.
If you're uncomfortable with the dependency versions, feel free to keep your fork up. The code is Apache licensed and any future updates are most likely to be just Kafka version updates anyway.
from kafka-junit.
Related Issues (20)
- Getting error when running unit test HOT 5
- Add support for Kafka version 0.10.2.0 HOT 2
- Failing JUnits on Windows HOT 9
- java.lang.NoSuchFieldError: configFileStr HOT 3
- JUnit 5 example test fails with NoSuchFieldError: configFileStr HOT 2
- Transactional producer not working HOT 2
- do not support transaction HOT 1
- Update to Kafka 2.1.1 HOT 2
- When using timeout to simulate "no-message" scenario, other regular test cases stop working HOT 4
- Kafka 2.3 is out HOT 2
- KafkaHelper threading issue HOT 3
- Kafka 2.4 HOT 3
- Multipartition topic HOT 2
- consumeStrings() discards buffered messages HOT 3
- Support Kafka 2.6
- kafka-junit support for kafka_2.13 (Kafka 2.6.0 recommends using Scala 2.13.x) HOT 3
- Breaking changes from Kafka 2.8.0 HOT 3
- EphemeralKafkaCluster with more than 2 brokers fails with NOT_ENOUGH_REPLICAS error HOT 1
- OWASP Dependency checker reported vulnerabilities in snappy java.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafka-junit.