HTTP Status 500 - java.lang.LinkageError: loader constraint violation: when resolving method 解决方法

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/manage/login_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

本机Tomcat与服务器上Tomcat版本不同会导致服务启动后,访问页面会报如上的错误
解决办法:
找到发布的webApp目录中WEB-INF-》lib,如下:
HTTP Status 500 - java.lang.LinkageError: loader constraint violation: when resolving method 解决方法_第1张图片

HTTP Status 500 - java.lang.LinkageError: loader constraint violation: when resolving method 解决方法_第2张图片

把lib目录下跟Tomcat相关的jar包删除就解决上面的问题了

你可能感兴趣的:(服务,java,oracle,jar)