Protobuf Error : Hbase createTable & put in java code(protobuf-LiteralByteString) Protobuf Error : Hbase createTable & put in java code(protobuf-LiteralByteString) hadoop hadoop

Protobuf Error : Hbase createTable & put in java code(protobuf-LiteralByteString)


Apache Hadoop 2.7.3 has a dependency on Protobuf 2.5.0. Reviewing the source code for Protobuf 2.5.0, the class com.google.protobuf.LiteralByteString is visible here:

https://github.com/google/protobuf/blob/v2.5.0/java/src/main/java/com/google/protobuf/LiteralByteString.java

However, this class is not present in later versions of Protobuf. For example, here is the com/google/protobuf directory in the recent 3.1.0 version:

https://github.com/google/protobuf/tree/v3.1.0/java/core/src/main/java/com/google/protobuf

Based on this, it is likely that your application has picked up a version of Protobuf other than 2.5.0 and put it on the classpath. I recommend running mvn dependency:tree on your application to see if it's picking up an incompatible Protobuf dependency (possibly transitively). If it looks fine in your application's Maven dependencies, then perhaps something is overriding the classpath at runtime when you launch the application and picking up an incorrect version of Protobuf.