[prev in list] [next in list] [prev in thread] [next in thread]
List: hadoop-user
Subject: Re: java.util.ArrayList cannot be cast to [Ljava.util.ArrayList in hive
From: Ted Yu <yuzhihong () gmail ! com>
Date: 2017-02-22 16:42:22
Message-ID: CALte62z2h0+XMCvyedw+pzgmvT2Sj_LSP63=kq72Onk7n3ZDQA () mail ! gmail ! com
[Download RAW message or body]
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 <merpqueen123@gmail.com> 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;
>
>
[Attachment #3 (text/html)]
<div dir="ltr">This question should be for Hive mailing list.<div><br></div><div>The \
exception message is quite clear: you're casting to <span \
style="font-size:12.8px">ArrayList[]</span></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 5:41 AM, \
merp queen <span dir="ltr"><<a href="mailto:merpqueen123@gmail.com" \
target="_blank">merpqueen123@gmail.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div> Object values[] = \
(Object[])str.getValue(); // Target values <br></div><div><br></div><div>I changed \
above line to below and its giving this error </div><div><br></div><div> \
ArrayList<Object> values[] = (ArrayList<Object>[])str.<wbr>getValue(); \
<br></div><div><br></div><div><br></div><div>Failed with exception \
java.io.IOException:org.<wbr>apache.hadoop.hive.ql.<wbr>metadata.HiveException: \
java.lang.ClassCastException: java.util.ArrayList cannot be cast to \
[Ljava.util.ArrayList;</div><div><br></div></div> </blockquote></div><br></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic