loader constraint violation错误

HTTP Status 500 - java.lang.LinkageError: loader constraint violation: when resolving method “org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;” the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of java/net/URLClassLoader) for the method’s defining class, org/apache/jasper/runtime/InstanceManagerFactory, have different Class objects for the type org/apache/tomcat/InstanceManager used in the signature

type Exception report

message java.lang.LinkageError: loader constraint violation: when resolving method “org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;” the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of java/net/URLClassLoader) for the method’s defining class, org/apache/jasper/runtime/InstanceManagerFactory, have different Class objects for the type org/apache/tomcat/InstanceManager used in the signature

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method “org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;” the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of java/net/URLClassLoader) for the method’s defining class, org/apache/jasper/runtime/InstanceManagerFactory, have different Class objects for the type org/apache/tomcat/InstanceManager used in the signature

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:349)

javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

java.lang.LinkageError: loader constraint violation: when resolving method “org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;” the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of java/net/URLClassLoader) for the method’s defining class, org/apache/jasper/runtime/InstanceManagerFactory, have different Class objects for the type org/apache/tomcat/InstanceManager used in the signature

org.apache.jsp.index_jsp._jspInit(index_jsp.java:53)

org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)

org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:179)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)

javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.23 logs.

Apache Tomcat/8.0.23

参考:

把tomcat8换为tomcat7后

报另一个错误:JspSourceImports找不到

HTTP Status 500 - java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspSourceImports

type Exception report

message java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspSourceImports

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspSourceImports

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:348)

javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspSourceImports

java.lang.ClassLoader.defineClass1(Native Method)

java.lang.ClassLoader.defineClass(ClassLoader.java:760)

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

java.net.URLClassLoader.defineClass(URLClassLoader.java:467)

java.net.URLClassLoader.access100(URLClassLoader.java:73)java.net.URLClassLoader1.run(URLClassLoader.java:368)

java.net.URLClassLoader$1.run(URLClassLoader.java:362)

java.security.AccessController.doPrivileged(Native Method)

java.net.URLClassLoader.findClass(URLClassLoader.java:361)

org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)

org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)

org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:376)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)

javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

java.lang.ClassNotFoundException: org.apache.jasper.runtime.JspSourceImports

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:126)

org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)

java.lang.ClassLoader.defineClass1(Native Method)

java.lang.ClassLoader.defineClass(ClassLoader.java:760)

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

java.net.URLClassLoader.defineClass(URLClassLoader.java:467)

java.net.URLClassLoader.access100(URLClassLoader.java:73)java.net.URLClassLoader1.run(URLClassLoader.java:368)

java.net.URLClassLoader$1.run(URLClassLoader.java:362)

java.security.AccessController.doPrivileged(Native Method)

java.net.URLClassLoader.findClass(URLClassLoader.java:361)

org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)

org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)

org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:376)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)

javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.62 logs.

后来不知道怎么重启了几次,重cp了部署包,就ok了。估计是缓存什么的问题。

最后发现,果然是缓存问题,把tomcat中的work/Catalina/localhost删掉即可!

2015.6.18

时间: 2024-10-23 03:51:15

loader constraint violation错误的相关文章

java.lang.LinkageError: loader constraint violation: when resolving interface method

异常:java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/Expression...... jbpm4 在tomcat6 下面ssh2 这个错误!原因是项目中WEB-INF/lib中的三个jar包(juel.jar, juel-engi

javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation:

javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;" th

Integrity constraint violation: 1052 Column 'status' in where clause is ambiguous

public function roleManage($search,$tpage,$num) { //查询一个角色所对应的多个用户,联表查询 $result=Db::name('role') ->field('r.rid,r.rolename,u.username') ->alias('r') ->join('user u','u.rid=r.rid','') ->where($search) ->select(); //数据总条数 $count=Db::name('rol

Delphi Access Violation错误的分析

转自:http://www.cnblogs.com/delphi7456/archive/2010/11/13/1876180.htmlDelphi Access Violation错误的分析 Delphi常见的运行期Access Violation错误有哪些?如何防止? 任何软件开发都会遇到这样的情况:你写好程序并测试,然后到处发送,结果用户告诉你它失败了. 你可能考虑用编译指令{$D}编译你的程序——Delphi可以建立一个有助于定位Access Violation错误的源代码的镜像文件.工

hibernate报org.hibernate.loader.custom.NonUniqueDiscoveredSqlAliasException错误

错误:org.hibernate.loader.custom.NonUniqueDiscoveredSqlAliasException 原因:关联查询的两个表有相同的列名, Query须要使用别名来区分相同名称的列. 解决方法:两个表中相同的列,只去其中的一个就可以了

"Unhandled exception in app.exe (QtGuid4.dll): 0xC0000005: Access Violation"错误解决

本文要解决的Qt调试问题截图如下: 起因:在代码中添加类型为QColor的二维数组,存储图片每个像素. 现象:调试时出现上图所示错误. 原因:经过百度以及反复查看代码,发现在代码中,有数组越界的情况.因为定义的时候,数组的两个维度大小不一样,而在实 现 QWidget的重画事件时,因为坐标系的差别,使得两个维度的顺序对换,使得发生数组越界的情况. 详细解释:在程序中我定义的数组是QColor color [ Height ] [ Width ], 我的本意是Height代表图片的高度,Heigh

foreign key constraint fails错误的原因

建表:CREATE TABLE Course ( Cno Char(4) PRIMARY KEY, Cname Char(40), Cpno Char(4), Ccredit Int, FOREIGN KEY (Cpno) REFERENCES Course(Cno) );插入数据:INSERT INTO Course VALUES('1','数据库','5',4);INSERT INTO Course VALUES('2', ' 数学', '',2); INSERT INTO Course V

深入浅出ClassLoader

你真的了解ClassLoader吗? 这篇文章翻译自zeroturnaround.com的 Do You Really Get Classloaders? ,融入和补充了笔者的一些实践.经验和样例.本文的例子比原文更加具有实际意义,文字内容也更充沛一些,非常感谢作者 Jevgeni Kabanov 能够共享如此优秀的文档. 1. 为什么你需要了解和敬畏ClassLoader ClassLoader在Java语言中占据了核心地位,Java应用服务器,OSGi,以及大量的网络框架,它们大多数都用到了

Java框架----SSH整合回顾

1,新建工程,类型为Web Project,设置默认编码为UTF-8,并创建如下文件夹 1,Source Folder 1,src 项目源码 2,config 配置文件 3,test 单元测试 2,普通文件夹 1,WebRoot/style css与图片等文件 2,WebRoot/script js脚本文件 3,WebRoot/WEB-INF/jsp jsp页面文件 3,包结构 1,实体 cn.itcast.oa.domain 2,Dao cn.itcast.oa.dao Dao接口 cn.it