Skip to content
This repository has been archived by the owner on Mar 24, 2018. It is now read-only.

Protobuf generated by ruby client can't be deserialized by java server #6

Open
edavedian opened this issue Nov 19, 2010 · 0 comments
Open

Comments

@edavedian
Copy link

I have written a ruby client which makes a REST call to a java server using the AddressBook example. When the protobuf in being deserialized by java, I am getting the following exception even though 'id' property was set in ruby client:

: com.google.protobuf.UninitializedMessageException: Message missing required fields: id
at com.google.protobuf.AbstractMessage$Builder.newUninitializedMessageException(AbstractMessage.java:550)
at com.symantec.AddressBookProtos$Person$Builder.build(AddressBookProtos.java:651)
at com.symantec.AddressBookProtos$Person$Builder.build(AddressBookProtos.java:1)
at com.symantec.ProtobufMessageBodyReader.readFrom(ProtobufMessageBodyReader.java:36)
... 39 more

For debugging purposes, I also serialized the same buffer in java and I realized that there is a small difference between the bytes serialized by ruby and the bytes serialized by java. The ruby generated bytes have an additional byte (2D) at the beginning and the rest is the same. Could this be the cause of the failure during deserialization?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant