启动 Hive 给我一个 SessioniveMetaStoreClietnt 运行时异常

Starting Hive gives me a SessioniveMetaStoreClietnt runtime exception

刚刚按照 Tutorials point 上的教程安装 Hive,我是 运行 Ubuntu 15.04,使用 Hadoop 2.6.0 并尝试使用 Derby 10.11.1.1 安装 Hive 1.2.1 完整执行时出错:

hive

    Exception in thread "main" java.lang.RuntimeException:
    java.lang.RuntimeException: unable to instantiate
    org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient at
    org.apache.hadoop.hive.ql.Session.SessionState.start(SessionState.java:522)

如有任何帮助,我们将不胜感激。

May be it could be due to more than one metastore_db. 

1. Remove "metastore_db".It should be under $HIVE_HOME/bin/metastore_db.

   You can locate it using "locate metastore_db"

   $ rm metastore_db/*.lck

2. Then restart hadoop cluster and the run hive from hive shell again. 
   See if it works or not.

编辑

JDBC DriverManager 找不到任何适合给定连接的驱动程序 URL。在连接数据库之前根本没有加载 JDBC 驱动程序,或者连接 URL 是错误的。检查你的 hive/lib 路径中的 derby.jar。是 derbyclient.jar 还是 derby.jar。同时检查 $HIVE_HOME/conf/hive-site.xml 文件以匹配 driver/connection url 路径