In my simple application i am trying to instantiate a KafkaConsumer my code is nearly a copy of the code from javadoc (\"Automatic Offset Committing\"):
@Slf4j
p
This might be the problem with Kafka classloading.
Setting classloader to null
might help.
...
Thread currentThread = Thread.currentThread();
ClassLoader savedClassLoader = currentThread.getContextClassLoader();
currentThread.setContextClassLoader(null);
KafkaConsumer consumer = new KafkaConsumer<>(props);
currentThread.setContextClassLoader(savedClassLoader);
...
There is full explanation:
https://stackoverflow.com/a/50981469/1673775