This exception is thrown because the class 'java.lang.String' does not have any fields annotated with '@com.baidu.bjf.remoting.protobuf.annotation.Protobuf'. The 'fetchFieldInfos' method in the 'ProtobufProxyUtils' class is trying to retrieve the field information from the class using this annotation, but since 'String' is a basic Java class and not a protobuf message class, it does not have any protobuf-specific annotations.

To resolve this issue, you need to make sure that the class being used with 'ProtobufProxy.create()' is a protobuf message class and has fields annotated with '@com.baidu.bjf.remoting.protobuf.annotation.Protobuf'.

Java.lang.IllegalArgumentException: Invalid class [java.lang.String] no field use annotation @com.baidu.bjf.remoting.protobuf.annotation.Protobuf - Protobuf Exception

原文地址: https://www.cveoy.top/t/topic/qFEv 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录