patschuh / KafkaEsque

Kafka Development Tool
GNU General Public License v3.0
74 stars 21 forks source link

Publish message feature failing #67

Open venukbh opened 3 months ago

venukbh commented 3 months ago

Where are the steps or guide to publish a message? Is the feature disabled? When ever I try to select a publish message icon, I always get the below error Missing required configuration "schema.registry.url" which has no default value

org.apache.kafka.common.KafkaException: Failed to construct kafka producer at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:471) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:291) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:318) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:303) at at.esque.kafka.handlers.ProducerHandler.registerProducer(ProducerHandler.java:111) at at.esque.kafka.PublisherController.setup(PublisherController.java:80) at at.esque.kafka.Controller.showPublishMessageDialog(Controller.java:1295) at at.esque.kafka.Controller.showPublishMessageDialog(Controller.java:1311) at at.esque.kafka.Controller.onPublishMessageClick(Controller.java:627) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at com.sun.javafx.reflect.Trampoline.invoke(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at javafx.base/com.sun.javafx.reflect.MethodUtil.invoke(Unknown Source) at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source) at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source) at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source) at javafx.base/javafx.event.Event.fireEvent(Unknown Source) at javafx.graphics/javafx.scene.Node.fireEvent(Unknown Source) at javafx.controls/javafx.scene.control.Button.fire(Unknown Source) at javafx.controls/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source) at javafx.controls/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source) at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source) at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source) at javafx.base/javafx.event.Event.fireEvent(Unknown Source) at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Unknown Source) at javafx.graphics/javafx.scene.Scene.processMouseEvent(Unknown Source) at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source) at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(Unknown Source) at javafx.graphics/com.sun.glass.ui.View.notifyMouse(Unknown Source) at javafx.graphics/com.sun.glass.ui.mac.MacView.notifyMouse(Unknown Source) Caused by: org.apache.kafka.common.config.ConfigException: Missing required configuration "schema.registry.url" which has no default value. at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:493) at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:483) at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:112) at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:132) at io.confluent.kafka.serializers.AbstractKafkaSchemaSerDeConfig.<init>(AbstractKafkaSchemaSerDeConfig.java:177) at io.confluent.kafka.serializers.protobuf.KafkaProtobufSerializerConfig.<init>(KafkaProtobufSerializerConfig.java:47) at io.confluent.kafka.serializers.protobuf.KafkaProtobufSerializer.configure(KafkaProtobufSerializer.java:69) at at.esque.kafka.serialization.KafkaEsqueSerializer.lambda$configure$0(KafkaEsqueSerializer.java:56) at java.base/java.lang.Iterable.forEach(Unknown Source) at at.esque.kafka.serialization.KafkaEsqueSerializer.configure(KafkaEsqueSerializer.java:56) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:388) ... 79 more

image

patschuh commented 3 months ago

@venukbh thanks for reporting this Problem.

The cause for this seems to be an oversight in the way the serializers are initialized. This makes it always require a schema.registry.url, even if unused. I'll try to get this fixed properly with the next Release.

As a workaround in the meantime: putting anything into the Schema Registry URL, saving the configuration, and restarting the app should get you around this error

venukbh commented 3 months ago

Adding a way of resolving the issue

Add this for your existing connections or while creating a new connection

image