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.

ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class

ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class

Contributor

Hi folks,

 

I installed json-serde-1.1.7-jar-with-dependencies.jar in /var/lib/hive/ hoping to use it to query Json data I've stored in a Hive table.  But this statement:

 

Create table xxx (

....)

ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe';

 

returns an error:

 

14/07/11 15:45:30 ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class org.openx.data.jsonserde.objectinspector.JsonObjectInspectorFactory
    at org.openx.data.jsonserde.JsonSerDe.initialize(JsonSerDe.java:128)
    at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:170)
    at org.apache.hadoop.hive.ql.metadata.Table.getDeserializerFromMetaStore(Table.java:272)
    at org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:265)

 

 

Have I installed the jar file in the right place?  Any other suggestions?

 

Many thanks,

 

ws

6 REPLIES 6
Highlighted

Re: ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class

New Contributor

Hi,

 

pls test to add the jar with the "Add Jar" Command on Hive Shell to see if the error comes from loading the jar?

 

"add jar /tmp/my_jar.jar;"

Documentation:

 

https://cwiki.apache.org/confluence/display/Hive/HivePlugins

Re: ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class

Contributor

Hi scubMUC,

 

Sorry, I should have included that detail.  I get no errors when I issue the add jar command.

 

Thanks,

 

ws

Re: ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class

New Contributor

have you fix it ?

Re: ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class

Contributor

Nope :-(  And now I won't be working on that project again (for completely different reasons).  But thanks for checking!

Re: ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class

New Contributor

ok :-) but i have to fix it.:-(

Re: ERROR exec.DDLTask: java.lang.NoClassDefFoundError: Could not initialize class

New Contributor

you can test this,maybe it's ok!

https://github.com/KunBetter/JsonSerDe

Don't have an account?
Coming from Hortonworks? Activate your account here