rcongiu / Hive-JSON-Serde

Read - Write JSON SerDe for Apache Hive.
Other
733 stars 391 forks source link

org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.openx.data.jsonserde.JsonSerDe #101

Closed teresayanaxs closed 9 years ago

teresayanaxs commented 9 years ago

I am using CDH 5.2.0

I have tried both the binary one and my compiled one from the master branch with versions configured in pom.xml

    <cdh5.version>5.2.0</cdh5.version>
    <cdh5.hive.version>0.13.1-cdh${cdh5.version}</cdh5.hive.version>
    <cdh5.hadoop.version>2.5.0-cdh${cdh5.version}</cdh5.hadoop.version>

then open hive client, added the jar and try to run the query,

hive> add jar /tmp/json-serde-1.3-jar-with-dependencies.jar; Added /tmp/json-serde-1.3-jar-with-dependencies.jar to class path Added resource: /tmp/json-serde-1.3-jar-with-dependencies.jar

hive> create external table if not exists tyan_json (

field1 string, field2 int, field3 string, field4 double) ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe' location '/user/tyan/data.json';

it says FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.openx.data.jsonserde.JsonSerDe

rcongiu commented 9 years ago

what command did you use to compile the serde ?

teresayanaxs commented 9 years ago

mvn package

rcongiu commented 9 years ago

please try mvn clean mvn -Pcdh5 package

note the -Pcdh5 to activate the cdh5 profile. If you don't specify that, it will just compile for cdh4.

after this, you should have anew json-serde-1.3-jar-with-dependencies.jar, use that one and make the old one isn't in the classpath.

teresayanaxs commented 9 years ago

Roberto,

Yes, it works now. Thanks a lot!

Teresa

rcongiu commented 9 years ago

Cool! No problem. Closing.

cosmin-novac commented 8 years ago

Hi rcongiu, I am having the same error on HDP 2.4 . I've packaged using Phdp23.

abhi232377 commented 7 years ago

Awesome !!!

kodo651 commented 7 years ago

Hi! I'm running a CDH 5.8 Quickstart and I'm unfortunately unable to get the SerDe to work in Hive. I've done the following:

The above result in "Execution Error, return code 1 from ... ... ...DDLTask. Cannot validate serde:org.openx..."

I then tried to download a precompiled (CDH5) an packaged using your download link - same error!

Finally I also tried to ADD the shim-jar with the json-serde-1.3.8-SNAPSHOT-jar-with-dependencies.jar - same result! What am I doing wrong here?

Cheers!

kodo651 commented 7 years ago

Solved! Sorry! chmod o+rx on the jars solved the problem!