今天看啥
热点:

loaderconstraintviolation错误,


 

错误信息

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

参考:

https://somebody-hjh.iteye.com/blog/778883 https://blog.163.com/huang_ying_lu/blog/static/2699983201182122719963/

我尝试把一个jar替换没改善,由于不能确定是哪个jar冲突,于是,把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.access$100(URLClassLoader.java:73)
    java.net.URLClassLoader$1.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.access$100(URLClassLoader.java:73)
    java.net.URLClassLoader$1.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删掉即可!

总结:
1. 把tomcat8换为tomcat7(当然,如果你明确知道哪个jar冲突,直接处理也行)
2. 清掉work

2015.6.18

www.bkjia.comtruehttp://www.bkjia.com/sybase/1236556.htmlTechArticleloaderconstraintviolation错误, 错误信息 HTTP Status 500 - java.lang.LinkageError: loader constraint violation: when resolving method org.apache.jasper.runtime.InstanceManag...

相关文章

相关搜索: 错误

帮客评论

视觉看点