Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I'm getting a "start token not found where expected" when selecting data from a table using the native JSON serde.

Solved Go to solution

I'm getting a "start token not found where expected" when selecting data from a table using the native JSON serde.

I created a table based off the Hive native JSON SerDe. My intention is to create a table for tweets. I've attached tweet-table.txt. The table is created without errors. I then load the data using the LOAD DATA INPATH command and I get no errors. When I try to select data from the table, I get the following error:

{"message":"H170 Unable to fetch results. java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start token not found where expected [ERROR_STATUS]","status":500,"trace":"org.apache.ambari.view.hive.client.HiveErrorStatusException: H170 Unable to fetch results. java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start token not found where expected [ERROR_STATUS]\n\norg.apache.ambari.view.hive.client.HiveErrorStatusException: H170 Unable to fetch results. java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start token not found where expected [ERROR_STATUS

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: I'm getting a "start token not found where expected" when selecting data from a table using the native JSON serde.

I was adding the wrong jar resource. Thanks for everyone's suggestions. If you want to help further, I'm now encountering this issue https://community.hortonworks.com/questions/31438/getting-all-nulls-when-selecting-from-a-hive-json....

4 REPLIES 4

Re: I'm getting a "start token not found where expected" when selecting data from a table using the native JSON serde.

Expert Contributor

As i recall is smth related to nested arrays. We're using another JSON serde lib and it does work with any complexity of jsons.

Here i posted an example of twitter table ddl which is tested well.

Regards,

Michael

Re: I'm getting a "start token not found where expected" when selecting data from a table using the native JSON serde.

Mentor

Scott, can you confirm youre having an issue with hive or the hive view? Please run your sql against hive cli or beeline. i have a working example here https://github.com/dbist/workshops/blob/master/hive/JSON/JSON_SERDE.txt

Another thing to keep in mind, switch to 1.2 introduced a clause for reserved keywords, in my example, user is a keyword and I turn the check off. Confirm your schema does not include any reserved words.

Re: I'm getting a "start token not found where expected" when selecting data from a table using the native JSON serde.

Thanks @Artem Ervits but I get the same results from HiveCL. It's all nulls. 9688f87e-f96b-4330-833c-c2e59ab2e9c9.png. Let me try @Michael M suggestion and I'll update the thread with the results.

Re: I'm getting a "start token not found where expected" when selecting data from a table using the native JSON serde.

I was adding the wrong jar resource. Thanks for everyone's suggestions. If you want to help further, I'm now encountering this issue https://community.hortonworks.com/questions/31438/getting-all-nulls-when-selecting-from-a-hive-json....