java.lang.ClassCastException

java.lang.String cannot be cast to org.apache.hadoop.hive.common.type.HiveVarchar

Solutions on the web19441

  • org.apache.hadoop.hive.common.type.HiveVarchar cannot be cast to java.lang.String
  • java.lang.String cannot be cast to org.apache.hadoop.hive.common.type.HiveVarchar
  • java.lang.String cannot be cast to org.apache.hadoop.hive.common.type.HiveVarchar
  • Stack trace

    • java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.hadoop.hive.common.type.HiveVarchar at org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaHiveVarcharObjectInspector.getPrimitiveWritableObject(JavaHiveVarcharObjectInspector.java:54) at org.apache.hadoop.hive.serde2.lazy.LazyUtils.writePrimitiveUTF8(LazyUtils.java:235) at org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.serialize(LazySimpleSerDe.java:307) at org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.serializeField(LazySimpleSerDe.java:262) at org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.doSerialize(LazySimpleSerDe.java:246) at org.apache.hadoop.hive.serde2.AbstractEncodingAwareSerDe.serialize(AbstractEncodingAwareSerDe.java:50) at org.apache.hive.hcatalog.mapreduce.FileRecordWriterContainer.write(FileRecordWriterContainer.java:122) at org.apache.hive.hcatalog.mapreduce.FileRecordWriterContainer.write(FileRecordWriterContainer.java:54) at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.write(MapTask.java:658) at org.apache.hadoop.mapreduce.task.TaskInputOutputContextImpl.write(TaskInputOutputContextImpl.java:89) at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.write(WrappedMapper.java:112) at com.lendingpoint.hadoop.hbasetohive.PhoenixToHiveMapper.map(PhoenixToHiveMapper.java:52) at com.lendingpoint.hadoop.hbasetohive.PhoenixToHiveMapper.map(PhoenixToHiveMapper.java:1) at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago