Tim B
Tim B

Reputation: 41208

Why do I get an error with missing ProtocolStringList in google protobuf?

I just ran into the problem where a reference to a ProtocolStringList caused a class not found error inside the generated code created by protoc.

In this case I got an Eclipse error:

com.google.protobuf.ProtocolStringList cannot be resolved to a type

I expect it could also show as a:

java.lang.NoClassDefFoundError: com/google/protobuf/ProtocolStringList

Upvotes: 3

Views: 3307

Answers (1)

Tim B
Tim B

Reputation: 41208

I couldn't find an answer to this on Stack Overflow so I'm posting it here.

It turns out this is caused by using later versions of protoc (2.6.1 in this case) with older versions of protobuf-java*.jar. (2.5.0 in this case).

Upvotes: 6

Related Questions