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. jstat gcutil

    QQA: jstat gcutil 的输出是什么意思 当 Java 程序有性能问题时,尤其是响应时间有突然变化时,最好第一时间查看 GC 的状态.一般用 jstat -gcutil <pid&g ...

  2. mysql5.7.20压缩版安装

    1.官网下载.zip格式的MySQL Server的压缩包,选择x86或x64版,并解压. 2. 创建 data文件夹 及 my.ini文件,并编辑 [mysqld] # 设置为自己MYSQL的安装目 ...

  3. java中装箱,拆箱

    (1)包装类 java中不能定义基本数据类型的对象,但是提供了基本数据类型的包装类来解决这一问题,例如int类型的包装类Integer, 包装类的常用方法有Integer.ParseInt()方法类将 ...

  4. hadoop完全分布式

    虚拟机克隆 a. vim /etc/udev/rules.d/70-persistent-net.rules 更改网卡名     b. vim /etc/sysconfig/network-scrip ...

  5. 【SpringBoot1.x】SpringBoot1.x 数据访问

    SpringBoot1.x 数据访问 简介 对于数据访问层,无论是 SQL 还是 NOSQL,Spring Boot 默认采用整合 Spring Data 的方式进行统一处理,添加大量自动配置,屏蔽了 ...

  6. 【SpringBoot1.x】RestfulCRUD

    SpringBoot1.x RestfulCRUD 文章源码 添加资源 将所有的静态资源都添加到 src/main/resources/static 文件夹下,所有的模版资源都添加到 src/main ...

  7. for update语句锁机制问题

    数据库小知识学习系列 问题: MySQL InnoDB中,select where xxx=123 for update:该xxx没有索引,是使用表锁还是全部数据加行锁? 答: InnoDB引擎(默认 ...

  8. Java 使用 mail.jar 实现邮件发送

    目录 准备工作 使用到的 jar 包 实现代码 准备工作 要想实现邮件发送, 需要先打开发送邮箱的 POP3/SMTP 服务,打开方式在 设置>帐户 中去打开,打开之后如果是qq邮箱会获得一个授 ...

  9. 基础篇-http协议《http 简介、url详解、request》

    目录 一.http 简介 二.url 详解 三.request 1.get 和 post 2.请求方法 3.request 组成 4.请求头 5.get 请求参数 6.post 请求参数 7.post ...

  10. Loadrunner录制脚本与编写脚本的区别

    异同点: 1.录制的和编写的脚本质量上没有区别 2.性能脚本关心的是用户和服务器的数据交互,从这点上来看,录制和编写也没有区别,手动编写脚本也可以写出很真实的脚本 3.能录制的情况下,就录制吧,谁每天 ...