eclipse里面添加hive maven相关依赖报错

原创 2016年05月30日 23:16:26

首先贴我的hive 相关依赖


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>


  <groupId>com.crxy.hive</groupId>
  <artifactId>hive</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>


  <name>hive</name>
  <url>http://maven.apache.org</url>


  <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <hive-api.version>0.14.0</hive-api.version>
      <hadoop-api.version>2.6.0</hadoop-api.version>
      <hadoop-core.version>1.2.1</hadoop-core.version>
      <JAVA_HOME>D:\java\jdk1.8.0\lib</JAVA_HOME>
    </properties>
    <dependencies>
    <!-- log4j -->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.12</version>
</dependency>
    <dependency>  
            <groupId>org.apache.hadoop</groupId>  
            <artifactId>hadoop-common</artifactId>  
            <version>${hadoop-api.version}</version>  
        </dependency>
    <dependency>
            <groupId>org.apache.hadoop</groupId>  
            <artifactId>hadoop-mapreduce-client-core</artifactId>  
            <version>${hadoop-api.version}</version>  
        </dependency>
    <dependency>  
            <groupId>org.apache.hadoop</groupId>  
            <artifactId>hadoop-core</artifactId>  
            <version>${hadoop-core.version}</version>  
        </dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-serde</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-service</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-metastore</artifactId>
<version>${hive-api.version}</version>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-common</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-cli</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libfb303</artifactId>
<version>0.9.0</version>
</dependency>


<dependency>
  <groupId>org.apache.calcite</groupId>
    <artifactId>calcite-avatica</artifactId>
    <version>0.9.2-incubating</version>
 </dependency>
 
  <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-core</artifactId>
            <version>0.9.2-incubating</version>
        </dependency>

    </dependencies>
     <build>
    <plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
    </build>
    

  第一个错误就是找不到Missing artifact jdk.tools:jdk.tools:jar:1.6

 解决:在pom.xml里添加具体的路径名
<dependency>  
     <groupId>jdk.tools</groupId>  
      <artifactId>jdk.tools</artifactId>  
     <version>1.6</version>  
     <scope>system</scope>  
     <systemPath>D:/java/jdk1.8.0/lib/tools.jar</systemPath>  
</dependency>

</project>


第二个错误就是可能会报各种找不到miss 

先用search everything 找到在自己maven仓库里的以.lastUpdated结尾的文件,把他们全部删除

再再maven工程里面update project 


第三个错就是

错误:

Multiple markers at this line
- Missing artifact org.apache.calcite:calcite-core:jar:0.9.2-incubating-SNAPSHOT
- Missing artifact org.apache.calcite:calcite-avatica:jar:0.9.2-incubating-SNAPSHOT

解决方法是再添加两个引用

 <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-exec</artifactId>
            <version>0.14.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-core</artifactId>
            <version>0.9.2-incubating</version>
        </dependency>
        <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-avatica</artifactId>
            <version>0.9.2-incubating</version>
        </dependency>



相关文章推荐

jdbc 连接hive所需要的jar(maven项目)

看到很多都是自己下包,但是版本什么的都是问题。。。maven项目很好的解决这个问题         junit       junit       3.8.1       test ...

Maven java通过jdbc连接Hive 执行HQL语句

lrwxrwxrwx. 1 hadoop hadoop 12 May 14 09:53 hadoop -> hadoop-2.2.0 drwxr-xr-x. 10 hadoop had...

JDBC连接Hive(包括Maven配置和本地jar配置)

查看服务器hive和hadoop版本可以使用hadoop version和hive命令查看hadoop版本[gc-user@hadoop-hive01 hadoop]$ hadoop version ...
  • db_guy
  • db_guy
  • 2017年08月01日 18:02
  • 297

hive maven 编程

dependency> groupId>org.apache.hivegroupId> artifactId>hive-jdbcartifactId> version>0.14...

Eclipse中操作Hive、HDFS时的jar包列表

Hadoop:2.4.0 Hive:0.13 在Eclipse中通过java代码操作Hive

开发hive UDF函数

1)首先创建一个java 项目,命名为HelloUDF,使用默认选项; 2)在src目录上右键,选择创建package,命名为com.test.hive.udf; 3)在package上右键,选择...

解决Eclipse导入Maven项目无法引入 Maven Dependencies Libraries 问题

有时候从网上导入别人的maven项目后,无法添加Maven Dependencies到Libraries下,其实只需要在.classpath文件中加入如下代码就好了. ...

Delphi7高级应用开发随书源码

  • 2003年04月30日 00:00
  • 676KB
  • 下载

Java + Spark SQL + Hive + Maven简单实现和异常问题

一. 前期准备 1.linux搭建Java和Scala环境搭建 2. linux搭建hadoop+spark+hive分布式集群 hadoop分布式集群搭建:hadoop分布式集群搭建 spa...

hive/hbase/hadoop的pom文件配置

- 4.0.0 Hbase01 pl 0.0.1-SNAPSHOT - - org.apache.hadoop hadoop-client 2.5.0 ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:eclipse里面添加hive maven相关依赖报错
举报原因:
原因补充:

(最多只允许输入30个字)