Reply
Highlighted
Explorer
Posts: 26
Registered: ‎06-18-2014

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

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

New Contributor
Posts: 9
Registered: ‎06-28-2014

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

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

Explorer
Posts: 26
Registered: ‎06-18-2014

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

Hi scubMUC,

 

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

 

Thanks,

 

ws

New Contributor
Posts: 3
Registered: ‎08-27-2014

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

have you fix it ?

Explorer
Posts: 26
Registered: ‎06-18-2014

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

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

New Contributor
Posts: 3
Registered: ‎08-27-2014

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

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

New Contributor
Posts: 3
Registered: ‎08-27-2014

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

you can test this,maybe it's ok!

https://github.com/KunBetter/JsonSerDe