Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

java.lang.ClassCastException: org.openx.data.jsonserde.json.JSONObject cannot be cast to java.lang.Long

avatar
New Member

**Hello, I am trying to load json data into hive table. I have created a hive table and loaded data into hive table.When i tried to retrieve that data i am getting the following exception.(select 8 from fs_json;)Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException: org.openx.data.jsonserde.json.JSONObject cannot be cast to java.lang.Long


I have checked with many posts in internet but haven't got my answer.Please help me.Thank you in advance.**

I am posting  my hive table.........
ADD JAR /rahul/json-serde-1.3.6-SNAPSHOT-jar-with-dependencies.jar;
create table fs_json(text string,
id bigint,
source string,
entities struct<symbols:array<string>,
user_mentions:array<struct<screen_name:string,
name:string>>,
urls:array<string>>,
retweet_count bigint,
`user` struct<
id:bigint,
profile_background_image_url_http:string,
profile_text_color:string,
profile_image_url_https:string,
entities:struct<url:struct<
urls:array<struct<expanded_url:string,
display_url:string>>>>>
)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
STORED AS TEXTFILE;I am posting you my json data............
My JSOn data:
[{ "contributors": null, "truncated": false, "text": "@AlDominick We hope you had a wonderful day, Al! Thanks for sharing.", "is_quote_status": false, "in_reply_to_status_id": 734844228761591809, "id": 734935544967385090, "favorite_count": 0, "source": "

1 ACCEPTED SOLUTION

avatar
Master Guru

@Practise Hadoop can you try with 1.3.7 serde?

View solution in original post

4 REPLIES 4

avatar
Master Guru

@Practise Hadoop can you try with 1.3.7 serde?

avatar
New Member

@Sunile Manjee Thank you so much its working

,

@Sunile Manjee

Thanks for the info.....its working

avatar
New Member

can you please share 1.3.7 serde

avatar
New Member

@teja i can share you.

just write your email id below