com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero)

1,282 views
Skip to first unread message

mancha

unread,
Jan 14, 2010, 7:51:56 PM1/14/10
to Protocol Buffers
Hi,
When dequeing the message using a Java client, the get the
following error. I am sending the data from a c++ server.
com.google.protobuf.InvalidProtocolBufferException: Protocol
message contained an invalid tag (zero)

I verified that the byte pattern on enqueuing from the c++ client
is the same as the byte pattern I am sending to
SComm.PositionUpdate.parseFrom(one_buf); in Java.
The byte pattern in one_buf is 10 3 86 79 68

and the class is ofcourse PositionUpdate with an outer class name
SComm.

How do I debug this further?

Any help is appreciated.

Thanks,
Madhav.

Daniel Wright

unread,
Jan 14, 2010, 8:05:12 PM1/14/10
to mancha, Protocol Buffers
Can you try to produce a stripped-down example (e.g. a proto file and a *short* stripped-down .java file) that exhibits the problem?  The byte pattern in your email does look valid to me, so there's more likely some issue where that isn't really what the protocol buffer code is seeing for some reason.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.




Madhav Ancha

unread,
Jan 15, 2010, 11:38:25 PM1/15/10
to Daniel Wright, Protocol Buffers
Hi Daniel,

   The protocol buffer code is working fine. It was a cryptic marshaling issue. Its resolved now. 

Thanks,
Madhav.
Reply all
Reply to author
Forward
0 new messages