embeddedkafka / embedded-kafka

A library that provides an in-memory Kafka instance to run your tests against.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ServerCnxnFactory is missing from the classpath

h-ngo opened this issue · comments

commented

Hello. We tried to upgrade to embeddedkafka 3.2.0 (from 2.7.0), and encountered below error.

"""
Symbol 'type org.apache.zookeeper.server.ServerCnxnFactory' is missing from the classpath.
This symbol is required by 'method io.github.embeddedkafka.ops.ZooKeeperOps.startZooKeeper'.
Make sure that type ServerCnxnFactory is in your classpath and check for conflicting dependencies with -Ylog-classpath.
A full rebuild may help if 'ZooKeeperOps.class' was compiled against an incompatible version of org.apache.zookeeper.server.
"""

We can't seem to figure out what the cause.

Java: 1.8
Scala: 2.13.8
Gradle: 6.7

Hi @h-ngo, have you tried adding the suggested flag -Ylog-classpath and see the resulting output?

commented

Yes. I did but I can't seem to find any useful info. Will take another look when I get a chance.

Any updates?

I am also trying to upgrade embedded kafka from 2.7.0 to 3.x.x and above and getting the same error. Is there any update on this?

There's no update both because I'm not spending much time on this project anymore and because I've been given little to work on for this issue..

Problem got fixed after I explicitly upgraded zookeeper version to 3.8.0.