使用Spring Boot操作Hive JDBC时,启动时报出错误:NoSuchMethodError: org.eclipse.jetty.servlet.ServletMapping.setDef

原创 2017年10月30日 16:51:47
  • 57

使用Spring Boot操作Hive JDBC时,启动时报出错误:NoSuchMethodError: org.eclipse.jetty.servlet.ServletMapping.setDefault(Z)V

  1. org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.eclipse.jetty.servlet.ServletMapping.setDefault(Z)V
  2. at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
  3. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) ~[spring-context-4.3.12.RELEASE.jar:4.3.12.RELEASE]
  4. at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
  5. at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
  6. at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
  7. at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
  8. at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
  9. at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]

此为jar包冲突,在Maven中添加如下:

  1. <dependency>
  2. <groupId>org.apache.hive</groupId>
  3. <artifactId>hive-jdbc</artifactId>
  4. <version>1.2.1</version>
  5. <exclusions>
  6. <exclusion>
  7. <groupId>org.eclipse.jetty.aggregate</groupId>
  8. <artifactId>jetty-all</artifactId>
  9. </exclusion>
  10. <exclusion>
  11. <groupId>org.apache.hive</groupId>
  12. <artifactId>hive-shims</artifactId>
  13. </exclusion>
  14. </exclusions>
  15. </dependency>

使用Spring Boot操作Hive JDBC时,启动时报出错误:NoSuchMethodError: org.eclipse.jetty.servlet.ServletMapping.setDef的更多相关文章

  1. 使用Spring boot整合Hive,在启动Spring boot项目时,报错

    使用Spring boot整合Hive,在启动Spring boot项目时,报出异常: java.lang.NoSuchMethodError: org.eclipse.jetty.servlet.S ...

  2. Spring Boot如何使用Runner实现启动时调用?用法和原理都在这里

    在日常的项目开发中经常会遇到这样的需求:项目启动的时候进行一些一次性的初始化工作,如读取加载资源文件.或者执行其它外部程序. 这个时候我们就可以用到spring-boot为我们提供的一种扩展机制--R ...

  3. Spring boot采坑记--- 在启动时RequstMappingHandlerMapping无法找到部分contorller类文件的解决方案

    最近有一个心得需求,需要在一个现有的springboot项目中增加一些新的功能,于是就在controller文件包下面创建新的包和类文件,但是后端开发完之后,本地测试发现前端访问报404错误,第一反应 ...

  4. Spring boot 整合hive-jdbc导致无法启动的问题

    使用Spring boot整合Hive,在启动Spring boot项目时,报出异常: 经过排查,是maven的包冲突引起的,具体做法,排除:jetty-all.hive-shims依赖包.对应的po ...

  5. Spring boot整合Hive

    使用Spring boot整合Hive,在启动Spring boot项目时,报出异常: java.lang.NoSuchMethodError: org.eclipse.jetty.servlet.S ...

  6. Spring Boot中Tomcat是怎么启动的

    Spring Boot一个非常突出的优点就是不需要我们额外再部署Servlet容器,它内置了多种容器的支持.我们可以通过配置来指定我们需要的容器. 本文以我们平时最常使用的容器Tomcat为列来介绍以 ...

  7. spring boot(10)-tomcat jdbc连接池

    默认连接池 tomcat jdbc是从tomcat7开始推出的一个连接池,相比老的dbcp连接池要优秀很多.spring boot将tomcat jdbc作为默认的连接池,只要在pom.xml中引入了 ...

  8. Spring Boot 在接收上传文件时,文件过大异常处理问题

    Spring Boot 在接收上传文件时,文件过大时,或者请求过大,spring内部处理都会抛出异常,并且捕获不到. 虽然可以通过调节配置,增大 请求的限制值. 但是还是不太方便. 之所以捕获不到异常 ...

  9. MongoDB最简单的入门教程之四:使用Spring Boot操作MongoDB

    Spring Boot 是一个轻量级框架,可以完成基于 Spring 的应用程序的大部分配置工作.Spring Boot的目的是提供一组工具,以便快速构建容易配置的Spring应用程序,省去大量传统S ...

随机推荐

  1. 20170612xlVBA多文件多类别分类求和匹配

    Public Sub Basic_CodeFrame() AppSettings 'On Error GoTo ErrHandler Dim StartTime, UsedTime As Varian ...

  2. 『PyTorch』第十一弹_torch.optim优化器

    一.简化前馈网络LeNet import torch as t class LeNet(t.nn.Module): def __init__(self): super(LeNet, self).__i ...

  3. python-day9-集合数据类型

    pythons=['alex','egon','yuanhao','wupeiqi','gangdan','biubiu']linuxs=['wupeiqi','oldboy','gangdan'] ...

  4. react项目打包后路径找不到,项目打开后页面空白的问题

    使用 npm install -g create-react-app快速生成项目脚手架打包后出现资源找不到的路径问题: 解决办法:在package.json设置homepage

  5. 利用padding-top/padding-bottom百分比,进行占位和高度自适应

    在css里面,padding-top,padding-bottom,margin-top,margin-bottom取值为百分比的时候,参照的是父元素的宽度. 比如:父元素宽度是100px, 子元素p ...

  6. linux command wc

    Linux command wc [Purpose]        Learning how to statistics line numbers in file   [Eevironment]    ...

  7. weblogic控制台定制不同权限的用户

    安装weblogic并创建域(domain)的时候,会默认创建一个用户,此用户为管理员,也就是权限最大的.只有这样一个用户,用起来很不安全,因为一个测试环境,好多人在用,经常会有人修改上面的数据源等关 ...

  8. Python Django 之 MVT

    一.Django的MVT模式 M: Model, 模型 与MVC中的M相同,负责对数据的处理 V: View, 视图 与MVC中的C类似,负责处理用户请求,调用M和T,响应请求 T: Template ...

  9. The "Double-Checked Locking is Broken" Declaration

    双重检查锁定在延迟初始化的单例模式中见得比较多(单例模式实现方式很多,这里为说明双重检查锁定问题,只选取这一种方式),先来看一个版本: public class Singleton { private ...

  10. IO文件相关操作

    IO编程 IO 即Input/Output  input stream 就是数据从外面(磁盘.网络)流进内存,output stream 就是数据从内存流到外面去. 通常cpu 和 内存的速度远远高于 ...