[protobuf] Re: toByteArray function(Java) occurs exception in 2.5.0

2013-03-13 Thread Hongseok Yoon
mistyping...

BUT not - But now

On Wednesday, March 13, 2013 3:42:47 PM UTC+9, Hongseok Yoon wrote:

 I've just updated to 2.5.0 from 2.4.1.
 before update, protobuf worked well, BUT now 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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@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.




[protobuf] no toByteArray()??

2011-10-12 Thread stefanharjes
Hi all,

I finally managed to construct java classes from my .proto file and
include them in my
source which puts a double array in the message. But then I realized,
that protoc did
not generate a toByteArray() method as promissed in the docs.

---
package storageserver;

option java_package = protocolBuffers;
option java_outer_classname = DoubleExchange;

message ExchangeData {
  repeated double my_data = 1;
}



any hints?

Thanks

Stefan

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