码迷,mamicode.com
首页 > 数据库 > 详细

springboot整合hive-jdbc遇到的坑

时间:2021-06-02 15:44:58      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:ack   rate   冲突   details   public   gate   jdbc   back   也有   

问题描述:springboot整合hive-jdbc时,pom文件加入hive-client依赖,eclipse启动,项目正常启动,访问正常。打成jar包放到服务器启动正常,访问报错如下:

org.apache.jasper.JasperException: /views/public.jsp(3,62) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:89) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:375) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:169) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:433) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:238) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:498) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:578) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1642) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.parse(Parser.java:181) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:156) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:390) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:427) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:570) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1642) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.Parser.parse(Parser.java:181) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239) ~[jsp-2.1-6.1.14.jar!/:6.1.14]
原因分析:貌似是缺少jstl的jar包,检查后发现自己项目lib里有啊~~~,实际原因:jar包冲突。因为springboot内嵌tomcat,而hive-jdbc也有一堆附加依赖tomcat、jasper的jar(具体没看,大概瞅了一眼)。

解决:hive-jdbc依赖排除一切和自己想要的功能无关附加依赖,具体如下:

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>2.3.2</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hive</groupId>
<artifactId>hive-shims</artifactId>
</exclusion>
<exclusion>
<artifactId>jasper-compiler</artifactId>
<groupId>tomcat</groupId>
</exclusion>
<exclusion>
<artifactId>jasper-runtime</artifactId>
<groupId>tomcat</groupId>
</exclusion>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
<exclusion>
<artifactId>log4j-slf4j-impl</artifactId>
<groupId>org.apache.logging.log4j</groupId>
</exclusion>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
OK,页面访问正常了~

 

————————————————
版权声明:本文为CSDN博主「-小末」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u013189824/article/details/80451095

springboot整合hive-jdbc遇到的坑

标签:ack   rate   冲突   details   public   gate   jdbc   back   也有   

原文地址:https://www.cnblogs.com/javalinux/p/14825280.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!