1,mysql加载的jar包未找到!

.........
Caused by: org.datanucleus.exceptions.NucleusException: Attempt to invoke the "BONECP" plugin to create a ConnectionPool gave an error : The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.
at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactoryImpl.java:232)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl.initialiseDataSources(ConnectionFactoryImpl.java:117)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl.<init>(ConnectionFactoryImpl.java:82)
... 79 more
Caused by: org.datanucleus.store.rdbms.connectionpool.DatastoreDriverNotFoundException: The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.
at org.datanucleus.store.rdbms.connectionpool.AbstractConnectionPoolFactory.loadDriver(AbstractConnectionPoolFactory.java:58)
at org.datanucleus.store.rdbms.connectionpool.BoneCPConnectionPoolFactory.createConnectionPool(BoneCPConnectionPoolFactory.java:54)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactoryImpl.java:213)
... 81 more

  

解决办法:

在mysql 官网下载  mysql-connector-java-5.0.8.tar.gz 的压缩包, 链接:mysql-connector下载

下载好后解压,将mysql-connector-java-5.0.8-bin.jar文件移动到 hive的安装目录下的lib文件夹下。

tar -zxvf mysql-connector-java-5.0.8.tar.gz  # 解压
mv mysql-connector-java-5.0.8、mysql-connector-java-5.0.8-bin.jar hive/lib/ #其中 hive/lib 为你的安装目录

注意:其中的 hive为你的安装hive安装目录。

2,MetaException(message 异常

Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1652)
... 23 more
Caused by: MetaException(message:Version information not found in metastore. )
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:83)
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:92)
at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6608)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:239)
at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:70)
... 28 more
Caused by: MetaException(message:Version information not found in metastore. )
at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:7754)

解决方式:在hive/conf下的hive-site.xml文件中配置hive.metastore.schema.verification 属性为false:

   <property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>

其中hive.metastore.schema.verification防止架构版本不兼容时的 Metastore 操作。考虑将此设置为“True”,以减少 Metastore 操作期间发生架构损坏的可能性

3,MetaException(message:Hive metastore database is not initialized数据库没有初始化.

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3793)
at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:244)
at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:227)
... 14 more
Caused by: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3556)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3528)
at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3790)
... 16 more

这是由于没有初始化数据库,生成元数据。 需要执行以下指令(在hive的bin目录下执行)

./schematool -initSchema -dbType mysql 

hive启动错误总结的更多相关文章

  1. hive启动报错(整合spark)

    spark整合hive后,hive启动报错: ls: cannot access /export/servers/spark/lib/spark-assembly-*.jar: No such fil ...

  2. Hive启动报错:java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument

    报错详细: Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preco ...

  3. weblogic启动错误

    一 .weblogic启动错误:java.lang.AccessertionError:java.lang.reflect.InvocationTargetException <unable t ...

  4. MySQL启动错误排查

    一般情况下mysql的启动错误还是很容易排查的,但是今天我们就来说一下不一般的情况.拿到一台服务器,安装完mysql后进行启动,启动错误如下: 有同学会说,哥们儿你是不是buffer pool设置太大 ...

  5. 【转】win7与ubuntu双系统,删除ubuntu后,启动错误error:no such partition grub rescue的修复--不错

    原文网址:http://blog.sina.com.cn/s/blog_541900d50101eu9r.html win7于ubuntu双系统,进入windows后直接格式化硬盘分区将ubuntu删 ...

  6. Windows Time服务无法启动 错误5拒绝访问

    接着上次写的文章 XP和Win7设置系统自动同步系统时间方法 本文就把故障出现的过程和解决方法一共写下来,希望大家可以看到本文在解决此项服务的思路.大家以后出现类似的问题和问题可以一样使用此类方法解决 ...

  7. 谦先生的bug日志之hive启动权限问题

    上海尚学堂谦先生的bug日志之hive启动权限问题 这几天开始做新老集群的迁移,今天开始对hive的所有数据进行迁移,主要是表的元信息和表数据.表的元信息我们存在mysql中,跟hive的服务器并不在 ...

  8. VisualSVN Server启动错误(0x8007042a)

    SVN Server启动错误(0x8007042a)   原因是SVN Server端口被占用 打开VisualSVN Server, 菜单->操作->Properties->Net ...

  9. myeclipse启动错误:org.eclipse.swt.SWTError: No more handles

    myeclipse启动错误,生成日志: !SESSION 2014-11-06 09:13:16.296 ----------------------------------------------- ...

随机推荐

  1. Redis学习笔记之数据库(一)

     说句实话,redis这个软件要学习的东西实在多,多到,看的多了就容易迷失,而且还记不住.个人觉得靠记忆去学习一个知识肯定是比较糟糕的,所以还是要带着理解的,最终变成自己的东西,那这个东西才是自己的. ...

  2. [ABP教程]第一章 创建服务端

    Web应用程序开发教程 - 第一章: 创建服务端 关于本教程 在本系列教程中, 你将构建一个名为 Acme.BookStore 的用于管理书籍及其作者列表的基于ABP的应用程序. 它是使用以下技术开发 ...

  3. Java并发编程实战(4)- 死锁

    在这篇文章中,我们主要讨论一下死锁及其解决办法. 目录 概述 死锁案例 死锁的原因和预防 破坏占用且等待条件 破坏不可抢占条件 破坏循环条件 使用等待-通知机制 Java中的等待-通知机制 条件曾经满 ...

  4. ArrayDeque API 与算法分析

    ArrayDeque 是双端队列的动态数组实现,可以当作栈和队列来使用.作为栈时,它的效率比 Stack 更高,作为队列时,效率比 LinkedList 更高.ArrayDeque 大部分操作的时间复 ...

  5. gin框架的路由源码解析

    前言 本文转载至 https://www.liwenzhou.com/posts/Go/read_gin_sourcecode/ 可以直接去原文看, 比我这里直观 我这里只是略微的修改 正文 gin的 ...

  6. MySQL 设置保留几天的binlog

    1 ) 查看默认的日志保存天数: mysql> show variables like 'expire_logs_days'; +------------------+-------+ | Va ...

  7. AvaloniaUI体验

    公司的原有的PC端WPF产品有跨平台需求,无奈微软自己的xamarin对wpf的支持当前尚未达到能支撑产品的成熟度,于是经过搜索,发现了一个号称用WPF实现跨平台的第三方图形库AvaloniaUI. ...

  8. Linux Clone函数

    Linux Clone函数 之前某一次有过一次面试,问了内核中是怎么创建命名空间的? 下面就来扒一扒clone的精髓,以及如何通过它创建命名空间. 目录 Linux Clone函数 使用clone创建 ...

  9. MySQL select join on 连表查询和自连接查询

    连表查询 JOIN ON 操作 描述 inner join 只返回匹配的值 right join 会从右表中返回所有的值, 即使左表中没有匹配 left join 会从左表中返回所有的值, 即使右表中 ...

  10. 【Java】流程控制 - 顺序结构、 选择(分支)结构(单分支、双分支、多分支、嵌套)、循环结构(for、while、do...while)、跳转语句(break、continue)

    流程控制语句结构 文章目录 流程控制语句结构 一. 顺序结构 1. 输出语句 2. 输入语句 3.code 二.复合语句 三. 分支结构 1. 条件判断 1.单分支结构 2.双分支结构 3.多分支结构 ...