Tomcat 加载 jsp 异常:ServletException: java.lang.LinkageError
环境:win10
JDK:java version "1.8.0_131"
mvn 内置 Tomcat 报错:
javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;"
the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/WEB_002dINF/views/success_jsp, and the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm)
for the method's defining class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:)
javax.servlet.http.HttpServlet.service(HttpServlet.java:)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:)
javax.servlet.http.HttpServlet.service(HttpServlet.java:)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:)
javax.servlet.http.HttpServlet.service(HttpServlet.java:)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:)
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:)
原因:
Tomcat 包下的 javax.el-api 与 用于验证的 Hibernate-validation 包下的 javax.el-api 冲突。
解决:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.0..CR2</version>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Tomcat 加载 jsp 异常:ServletException: java.lang.LinkageError的更多相关文章
- Tomcat加载JSP原理
Tomcat加载JSP主要有以下几个类: JspServlet JspServletWrapper JspCompilationContext JspRuntimeContext JsperLoade ...
- javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation:
javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving ...
- 【异常】java.lang.LinkageError: loader constraints violated
[问题背景] 南非客户帐单提醒功能过程中的一个问题,当启动服务器后,后台报java.lang.LinkageError: loader constraints violated when l ...
- 某APK中使用了动态注册BroadcastReceiver,Launcher中动态加载此APK出现java.lang.SecurityException异常的解决方法
在某APK中,通过如下方法动态注册了一个BroadcastReceiver,代码参考如下: @Override protected void onAttachedToWindow() { super. ...
- HTTP Status 500 - javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag
我在项目中导入了jar,还是不能使用EL表达式,一运行就出现了下面的额错误: org.apache.jasper.JasperException: javax.servlet.ServletExcep ...
- 用eclipse部署tomcat时出现异常:java.lang.IllegalArgumentException
用eclipse部署tomcat时出现异常:java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: c ...
- Tomcat发布Maven项目遇到异常:java.lang.OutOfMemoryError: PermGen space
前言: 本问题出现在tomcat 7发布 web3.0Maven项目的时候出现. 问题阐述: 异常:java.lang.OutOfMemoryError:PermGen space 解决如下: 1. ...
- 学习Tomcat动态加载JSP的Class类
今天在修改项目一个JSP文件时,突然想到Tomat是怎么实现动态实时加载JSP编译后的class类的? 查了半天资料,看了很多文章,终于明白是怎么回事了:ClassLoader,当tomcat发现js ...
- 关于jsp web项目中的javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver错误
错误: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver org.apache.j ...
随机推荐
- js this 引起的祸
注意:这里的 this 指向已经改变了. 所以不能再次使用 this 需在上面自定义变量. 那些年踩过的坑,记录一下.
- Linux系统解析域名的先后顺序【转帖】
Linux系统解析域名的先后顺序 gd_WWW已经在本地(/etc/hosts)进行指向,但是竟然还能解析到外网,让我百思不得其解.经过不断查找发现域名解析与以下四个文件有关: /etc/hosts ...
- Datagrip连接SQLServer Connecting DataGrip to MS SQL Server
Connecting DataGrip to MS SQL Server Posted on June 21, 2016 by Maksim Sobolevskiy Some specific nee ...
- MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report e
早上来到公司,线上的项目报错: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionExcepti ...
- Sublime Text 3 3143 注册码和遇到的PyV8无法下载问题
packagecontrol官网:https://packagecontrol.io/installation sublime安装之后,安装Package Control管理插件. sublime3 ...
- 查看java内存情况命令
转自:http://boendev.iteye.com/blog/882479 jinfo:可以输出并修改运行时的java 进程的opts. jps:与unix上的ps类似,用来显示本地的java进程 ...
- react build后直接从浏览器打开
存在两个问题 一,资源文件路径 config/paths.js 这里原来的.pathname:'/', 改成.pathname:'./' function getServedPath(appPacka ...
- 解决macOS git clone Azure DevOps提示身份认证失败问题
macOS的终端输入git clone对应Azure DevOps的Git地址,紧接着输入正确的用户名和密码仍然会提示认证失败.解决的方法是安装微软的Git-Credential-Manager.由于 ...
- PHP实现URL长连接转短连接方法总结
短链接,通俗来说,就是将长的URL 网址,通过程序计算等方式,转换为简短的网址字符串. 这样的话其好处为:1.内容需要:2.用户友好:3.便于管理. 实现短网址(short URL)系统比较流行的算法 ...
- rails 杂记 - render and layout
官方文档:http://guides.rubyonrails.org/layouts_and_rendering.html 渲染 view 渲染 html.rb 与相应的 action control ...