Generated protobuf classes as of version 2.3.0 do not implement
Serializable. A change to support this was recently submitted against the
version of the code in our internal repository, but I have not yet had the
chance to port it to the cross-platform version (I will do so sometime
before the next release). As it turns out, the internal version has the bug
you describe. Are you a Google employee?
On Mon, Apr 19, 2010 at 8:15 AM, robfig <rob...@gmail.com> wrote:
> Protoc generates Java classes that produce warnings upon compilation,
> of the form:
> warning: [serial] serializable class
> com.example.ExampleApp.ExampleMessage has no definition of
> It looks like it should be easy to fix this problem (e.g. just add
> private static final long serialVersionUID = 1L; to each class
> definition). I haven't yet investigated whether or not it's possible
> to make this change using plugins, but it seems like something that
> should be fixed in protoc.
> Curiously, I haven't been able to find any other report of this issue,
> so it's also a possibility that something is messed up for me in
> particular. I run protoc using ant as follows:
> <target name="protoc" if="protoc.exists" depends="init">
> <apply executable="protoc" failifexecutionfails="true"
> relative="true" osfamily="windows">
> <arg value="-I=src"/>
> <arg value="--java_out=src"/>
> <fileset dir="." includes="src/**/*.proto" />
> <mapper type="glob" from="*.proto" to="*.java"/>
> Everything works great, except for the compile warnings. I use the
> latest protoc.
> $ protoc --version
> libprotoc 2.3.0
> Any ideas?
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to
> For more options, visit this group at
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at