Search code examples
oraclehadoophivehive-metastore

How to fix HIVE Metastore Error: metastore.RetryingHMSHandler: java.lang.NoSuchFieldError: REPLDIR


I am new to Hive. I am using Oracle DB as the metastore. Everything has been working fine prior to this time. Whenvever I run this command now hive --service metastore I get this error

 ERROR metastore.RetryingHMSHandler: java.lang.NoSuchFieldError: REPLDIR
        at org.apache.hadoop.hive.metastore.repl.DumpDirCleanerTask.setConf(DumpDirCleanerTask.java:42)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:588)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147)
        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108)
        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:80)
        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:93)
        at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:8661)
        at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:8656)
        at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:8926)
        at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:8843)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:236)

I have checked for similar errors here, I have not seen one which addressed the issue. This is the configuration part of hive-site.xml

  <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>username</value>
    <description>Username to use against metastore database</description>
  </property>
  
<property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:oracle:thin:@//<db:port/schema></value>
    <description>
      JDBC connect string for a JDBC metastore.
      To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL.
      For example, jdbc:postgresql://myhost/db?ssl=true for postgres database.
    </description>
  </property>
  <property>
  <name>javax.jdo.option.ConnectionDriverName</name>
  <value>oracle.jdbc.OracleDriver</value>
</property>
  
  <property>
    <name>hive.metastore.warehouse.dir</name>
    <value>hdfs://localhost:9000/user/hive/warehouse</value>
    <description>location of default database for the warehouse</description>
  </property>

Who has experienced this before? How do I solve it?


Solution

  • I fixed this error by deleting a redundant hive-common version in lib folder in hive.