Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Proto class is not a valid proto3 message class #44

@iguenkinrl

Description

@iguenkinrl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions