java.util.ArrayList cannot be cast to [Ljava.util.ArrayList in hive

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

java.util.ArrayList cannot be cast to [Ljava.util.ArrayList in hive

merp queen
  Object values[] = (Object[])str.getValue();  // Target values 

I changed above line to below and its giving this error 

 ArrayList<Object> values[] = (ArrayList<Object>[])str.getValue(); 


Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.util.ArrayList;

Reply | Threaded
Open this post in threaded view
|

Re: java.util.ArrayList cannot be cast to [Ljava.util.ArrayList in hive

Ted Yu-3
This question should be for Hive mailing list.

The exception message is quite clear: you're casting to ArrayList[]

On Wed, Feb 22, 2017 at 5:41 AM, merp queen <[hidden email]> wrote:
  Object values[] = (Object[])str.getValue();  // Target values 

I changed above line to below and its giving this error 

 ArrayList<Object> values[] = (ArrayList<Object>[])str.getValue(); 


Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.util.ArrayList;