zoukankan      html  css  js  c++  java
  • 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;" 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)


    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)

    做项目过程中遇到上述错误,将项目的pom.xml文件中的Dependencies中依赖的Scope: compile改为Scope: provided即可

  • 相关阅读:
    python 04 list增删改查 迷途小书童
    xhtml+css符合标准的WEB设计
    在Ubuntu16.0.4安装hipcaffe
    简单使用OpenSSL生成密钥
    Ubuntu 16.04 集成安装Apache+PHP+Kerberos+LDAP+phpLDAPadmin
    Ubuntu 安装mysql & 自定义数据存储目录
    TestLink+Jenkins在Ubuntu16.04搭建集成测试环境
    Rancher 2.1平台搭建及使用
    JavaFX_homework1_pane
    linux 命令1 转
  • 原文地址:https://www.cnblogs.com/jackiehe/p/4703053.html
Copyright © 2011-2022 走看看