类型“org/eclipse/equinox/http/servlet/httpserviceservlet”(当前帧,堆栈[0])不可分配给“javax/servlet/http/httpservlet”

uplii1fm  于 2021-06-29  发布在  Java
关注(0)|答案(0)|浏览(236)

我有一个非常奇怪的行为,有时它启动时没有错误,或者它会给我java.lang.verifyerror:操作数堆栈上的错误类型
它采用了openjdk 11.0.3,我也尝试了11.0.9,没有任何改动,它在tomcat 9中运行,我强制使用jsp2.2和servlet 3.0,因为它是一个非常旧的应用程序。
我的调试选项是什么?是jvm错误?
类加载日志:

[157.897s][info   ][class,load] org.eclipse.equinox.http.servletbridge.internal.Activator source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/org.eclipse.equinox.http.servletbridge_1.1.100.v20180827-1235.jar
[157.899s][info   ][class,load] javax.servlet.Servlet source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/javax.servlet-3.0.0.v201112011016.jar
[157.899s][info   ][class,load] javax.servlet.ServletConfig source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/javax.servlet-3.0.0.v201112011016.jar
[157.899s][info   ][class,load] javax.servlet.GenericServlet source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/javax.servlet-3.0.0.v201112011016.jar
[157.899s][info   ][class,load] javax.servlet.http.HttpServlet source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/javax.servlet-3.0.0.v201112011016.jar
[157.899s][info   ][class,load] org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/org.eclipse.equinox.http.servlet_1.2.0.v20150519-1816.jar
[157.899s][info   ][class,load] org.eclipse.equinox.http.servlet.HttpServiceServlet source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/org.eclipse.equinox.http.servlet_1.2.0.v20150519-1816.jar
[157.900s][info   ][class,load] org.eclipse.equinox.http.servlet.internal.Activator source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/org.eclipse.equinox.http.servlet_1.2.0.v20150519-1816.jar
[157.901s][info   ][class,load] org.osgi.service.http.HttpService source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/org.eclipse.osgi.services_3.7.100.v20180827-1536.jar
[157.901s][info   ][class,load] org.eclipse.equinox.http.servlet.ExtendedHttpService source: file:/appservers/tomcat/webapps/app/work/eclipse/plugins/org.eclipse.equinox.http.servlet_1.2.0.v20150519-1816.jar
[157.901s][info   ][class,load] java.lang.VerifyError source: jrt:/java.base

在单独文件中记录的错误:

!ENTRY org.eclipse.equinox.http.servletbridge 4 0 2020-12-18 08:29:43.240
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Error starting module.
    at org.eclipse.osgi.container.Module.doStart(Module.java:593)
    at org.eclipse.osgi.container.Module.start(Module.java:452)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1685)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1665)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1627)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1558)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/eclipse/equinox/http/servletbridge/internal/Activator.start(Lorg/osgi/framework/BundleContext;)V @15: invokestatic
  Reason:
    Type 'org/eclipse/equinox/http/servlet/HttpServiceServlet' (current frame, stack[0]) is not assignable to 'javax/servlet/http/HttpServlet'
  Current Frame:
    bci: @15
    flags: { }
    locals: { 'org/eclipse/equinox/http/servletbridge/internal/Activator', 'org/osgi/framework/BundleContext' }
    stack: { 'org/eclipse/equinox/http/servlet/HttpServiceServlet' }
  Bytecode:
    0000000: 2abb 0012 59b7 0021 b500 1f2a b400 1fb8
    0000010: 0022 b1                                

    at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
    at java.base/java.lang.Class.getConstructor0(Class.java:3342)
    at java.base/java.lang.Class.newInstance(Class.java:556)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:766)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:719)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1005)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:357)
    at org.eclipse.osgi.container.Module.doStart(Module.java:584)
    ... 8 more
Root exception:
java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/eclipse/equinox/http/servletbridge/internal/Activator.start(Lorg/osgi/framework/BundleContext;)V @15: invokestatic
  Reason:
    Type 'org/eclipse/equinox/http/servlet/HttpServiceServlet' (current frame, stack[0]) is not assignable to 'javax/servlet/http/HttpServlet'
  Current Frame:
    bci: @15
    flags: { }
    locals: { 'org/eclipse/equinox/http/servletbridge/internal/Activator', 'org/osgi/framework/BundleContext' }
    stack: { 'org/eclipse/equinox/http/servlet/HttpServiceServlet' }
  Bytecode:
    0000000: 2abb 0012 59b7 0021 b500 1f2a b400 1fb8
    0000010: 0022 b1                                

    at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
    at java.base/java.lang.Class.getConstructor0(Class.java:3342)
    at java.base/java.lang.Class.newInstance(Class.java:556)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:766)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:719)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1005)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:357)
    at org.eclipse.osgi.container.Module.doStart(Module.java:584)
    at org.eclipse.osgi.container.Module.start(Module.java:452)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1685)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1665)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1627)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1558)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题