Hello everyone,

I have generated the java classes from .proto file using the protoc.exe 
tool (latest version)

Proto syntax version is 2.

Original .proto file was generated from C# classes decorated with 
protobuf-net attributes.

The java snippet with error:

public  static final class Object extends
      com.google.protobuf.GeneratedMessageV3 implements
      ObjectOrBuilder {
    // Use Object.newBuilder() to construct.
    private Object(com.google.protobuf.GeneratedMessageV3.Builder<?> 
builder) {
    private Object() {

    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    private Object(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      int mutable_bitField0_ = 0;
      int mutable_bitField1_ = 0;
      int mutable_bitField2_ = 0;
      int mutable_bitField3_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
*case 2147793578*: {
subBuilder = null;
              if (((bitField1_ & 0x00004000) == 0x00004000)) {
                subBuilder = repositoryDto_.toBuilder();
              repositoryDto_ = 
              if (subBuilder != null) {
                repositoryDto_ = subBuilder.buildPartial();
              bitField1_ |= 0x00004000;


The compiler error :
Error:(78400, 18) java: integer number too large: 2147793578

For the same .proto file were generated c++ classes that are successfully 

Have anyone ideas how to fix this problem?

Denis Vlah

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to