Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/apache/catalina/loader/ParallelWebappClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of java/net/URLClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
- at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:418)
- at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
- at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
- at org.apache.kafka.clients.CommonClientConfigs.<clinit>(CommonClientConfigs.java:32)
- at org.apache.kafka.clients.producer.ProducerConfig.<clinit>(ProducerConfig.java:305)
- at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:304)
- String topicName = "camunda";
- String test = "test123";
- Properties props = new Properties();
- props.put("bootstrap.servers", "localhost:9092,localhost:9093");
- props.put("key.serializer","org.apache.kafka.common.serialization.StringSerializer");
- props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
- Producer<String, String> producer = new KafkaProducer <>(props);
- ProducerRecord<String, String> record = new ProducerRecord<>(topicName,test);
- producer.send(record);
- producer.close();
Add Comment
Please, Sign In to add comment