You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
I've installed protobuf convertor and build my own protobuf definition jar.
I've put it into ../confluent/share/java/kafka-serde-tools/ directory
in my connector definition I set up "value.converter.protoClassName":"com.rl.messaging.messages.BusinessEventMessages$BusinessEvent" when I'm starting connector I've got the following error message ERROR Failed to start task rabbitMQ-src-0 (org.apache.kafka.connect.runtime.Worker:473) org.apache.kafka.connect.errors.ConnectException: Proto class com.rl.messaging.messages.BusinessEventMessages$BusinessEvent is not a valid proto3 message class
in ProtobufConverter.java code I found the following entry String protoClassNameString = protoClassName.toString(); try { protobufData = new ProtobufData(Class.forName(protoClassNameString).asSubclass(com.google.protobuf.GeneratedMessageV3.class), legacyNameString); } catch (ClassNotFoundException e) { throw new ConnectException("Proto class " + protoClassNameString + " not found in the classpath"); } catch (ClassCastException e) { throw new ConnectException("Proto class " + protoClassNameString + " is not a valid proto3 message class"); }
that means that my own protobuf should be a subclass of com.google.protobuf.GeneratedMessageV3.class
How should I build my own protobuf jar to solve this error ?
Change the first line in BusinessEventMessages.proto from syntax = "proto2"; to syntax = "proto3";. That tells protoc to compile a generated class for proto3. Please note that there are some differences in proto2 v/s proto3. There is no optional keyword as every field is optional by default - among some other differences. But I mentioned optional specifically since you are using it with in your messages.
@bagipriyank Hello, I'm facing this issue at the moment. Does blueapron only support proto3? Our proto needs to be proto2 due to certain restrictions. Is there a configuration for specifying the type of proto? Thanks!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I've installed protobuf convertor and build my own protobuf definition jar.
I've put it into ../confluent/share/java/kafka-serde-tools/ directory
in my connector definition I set up
"value.converter.protoClassName":"com.rl.messaging.messages.BusinessEventMessages$BusinessEvent"
when I'm starting connector I've got the following error message ERROR Failed to start task rabbitMQ-src-0 (org.apache.kafka.connect.runtime.Worker:473) org.apache.kafka.connect.errors.ConnectException: Proto class com.rl.messaging.messages.BusinessEventMessages$BusinessEvent is not a valid proto3 message class
in ProtobufConverter.java code I found the following entry
String protoClassNameString = protoClassName.toString(); try { protobufData = new ProtobufData(Class.forName(protoClassNameString).asSubclass(com.google.protobuf.GeneratedMessageV3.class), legacyNameString); } catch (ClassNotFoundException e) { throw new ConnectException("Proto class " + protoClassNameString + " not found in the classpath"); } catch (ClassCastException e) { throw new ConnectException("Proto class " + protoClassNameString + " is not a valid proto3 message class"); }
that means that my own protobuf should be a subclass of com.google.protobuf.GeneratedMessageV3.class
How should I build my own protobuf jar to solve this error ?
BusinessEventMessages.proto.zip
The text was updated successfully, but these errors were encountered: