hakish
hakish

Reputation: 4048

Unable to create a table from Hive CLI - ERROR 23502

I seem to be getting the below exception when I try to create a table using Hive client.

create table if not exists test (id int, name string) comment 'test table';

11:15:32.016 [HiveServer2-Background-Pool: Thread-34] ERROR org.apache.hadoop.hive.metastore.RetryingHMSHandler - Retrying HMSHandler after 2000 ms (attempt 1 of 10) with error: javax.jdo.JDODataStoreException: Insert of object "org.apache.hadoop.hive.metastore.model.MTable@784fafc2" using statement "INSERT INTO TBLS (TBL_ID,CREATE_TIME,DB_ID,LAST_ACCESS_TIME,OWNER,RETENTION,SD_ID,TBL_NAME,TBL_TYPE,VIEW_EXPANDED_TEXT,VIEW_ORIGINAL_TEXT) VALUES (?,?,?,?,?,?,?,?,?,?,?)" failed : Column 'IS_REWRITE_ENABLED' cannot accept a NULL value. at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:543) at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:720)

Caused by: ERROR 23502: Column 'IS_REWRITE_ENABLED' cannot accept a NULL value. at org.apache.derby.client.am.ClientStatement.completeExecute(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(Unknown Source)

I did search but couldn't find a satisfactory resolution.

Here is my set up:

Hive 2.1.0 OS: Windows Hadoop: 2.9.2 Derby: 10.14.2.0

What am i missing?

Thanks.

Upvotes: 2

Views: 1124

Answers (1)

hakish
hakish

Reputation: 4048

Seems like a compatibility issue with derby. I moved back to a earlier version of derby 10.2.1.1 and the issue went away.

Upvotes: 1

Related Questions