java.lang.SecurityException: class "javax.servlet.AsyncContext"'s signer information does not match signer information of other classes in the same package
最近在写个Http协议的压测挡板时,遇到以下错误。
1 2018-03-08 10:34:07.808:INFO:oejs.Server:jetty-8.1.9.v20130131 2 2018-03-08 10:34:08.102:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080 3 2018-03-08 10:34:10.720:WARN:oeji.nio: 4 java.lang.SecurityException: class "javax.servlet.AsyncContext"'s signer information does not match signer information of other classes in the same package 5 at java.lang.ClassLoader.checkCerts(ClassLoader.java:898) 6 at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668) 7 at java.lang.ClassLoader.defineClass(ClassLoader.java:761) 8 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) 9 at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) 10 at java.net.URLClassLoader.access$100(URLClassLoader.java:73) 11 at java.net.URLClassLoader$1.run(URLClassLoader.java:368) 12 at java.net.URLClassLoader$1.run(URLClassLoader.java:362) 13 at java.security.AccessController.doPrivileged(Native Method) 14 at java.net.URLClassLoader.findClass(URLClassLoader.java:361) 15 at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 16 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) 17 at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 18 at org.eclipse.jetty.server.AbstractHttpConnection.<init>(AbstractHttpConnection.java:157) 19 at org.eclipse.jetty.server.AsyncHttpConnection.<init>(AsyncHttpConnection.java:50) 20 at org.eclipse.jetty.server.nio.SelectChannelConnector.newConnection(SelectChannelConnector.java:285) 21 at org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager.newConnection(SelectChannelConnector.java:325) 22 at org.eclipse.jetty.server.nio.SelectChannelConnector.newEndPoint(SelectChannelConnector.java:272) 23 at org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager.newEndPoint(SelectChannelConnector.java:331) 24 at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.createEndPoint(SelectorManager.java:841) 25 at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:496) 26 at org.eclipse.jetty.io.nio.SelectorManager$1.run(SelectorManager.java:290) 27 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) 28 at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) 29 at java.lang.Thread.run(Thread.java:748)
网上查找没有结果,最终自己通过以下方法解决:
1、找到报错的类所在的jar。(javax.servlet.AsyncContext)
2、删除jar包里META-INF目录下中类似的内容
Name: javax/servlet/resources/xml.xsd SHA1-Digest: jpEOb2r1A1MfJ495axauVoFqbl4=
3、删除jar包里META-INF目录下ECLIPSEF.RSA文件