I solved it. 

**.proto files recompiled by protoc-2.5.0.exe.

2013년 10월 30일 수요일 오전 9시 48분 38초 UTC+9, nishith agarwal 님의 말:
>
> Hey, 
> I'm facing the same issue ? Were you able to resolve it? Could you share 
> what the problem was?
>
> Thanks
>
> On Wednesday, March 13, 2013 6:59:49 PM UTC-7, Hongseok Yoon wrote:
>>
>> my protocol file begin with...
>>
>> option java_outer_classname = "Protocol";
>>
>> message MyMessage
>> {
>>     required ID id = 1;
>>     optional .... // omitted
>>     ...
>> }
>>
>> only one required field and all others are optional.
>>
>> And my test code is...(just same)
>>
>> Protocol.MyMessage.newBuilder().setId(Protocol.ID.MY_PROTOCOL).build().
>> toByteArray();
>>
>> toByteArray() function make exception.
>> without it, it's okay
>>
>> On Thursday, March 14, 2013 4:40:23 AM UTC+9, Feng Xiao wrote:
>>>
>>> Could you attach your test code and the .proto file?
>>>
>>>
>>> On Tue, Mar 12, 2013 at 11:42 PM, Hongseok Yoon <hongse...@gmail.com>wrote:
>>>
>>>> I've just updated to 2.5.0 from 2.4.1.
>>>> before update, protobuf worked well, BUT not it vomit exceptions!
>>>> I'm working on OSX and use Java 1.7
>>>>
>>>> my test code snippet is...
>>>>
>>>> Protocol.MyMessage.newBuilder().setId(Protocol.ID.MY_PROTOCOL).build().
>>>> toByteArray();
>>>>
>>>> if I run compiled code...
>>>>
>>>> Exception in thread "main" java.lang.UnsupportedOperationException: 
>>>> This is supposed to be overridden by subclasses.
>>>> at 
>>>> com.google.protobuf.GeneratedMessage.getUnknownFields(GeneratedMessage.java:180)
>>>>  at 
>>>> com.indiebuild.poker.Protocol$PokerMessage.getSerializedSize(Protocol.java:1454)
>>>> at 
>>>> com.google.protobuf.AbstractMessageLite.toByteArray(AbstractMessageLite.java:62)
>>>>  at TestClient.main(TestClient.java:8)
>>>>
>>>> What's wrong?
>>>>
>>>> -- 
>>>> 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+u...@googlegroups.com.
>>>> To post to this group, send email to prot...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/protobuf?hl=en.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>  
>>>>  
>>>>
>>>
>>>

-- 
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 http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to