gpt4 book ai didi

java - 类型 'org/springframework/http/MediaType'(当前帧,堆栈 [1])不可分配给 'org/springframework/util/MimeType'

转载 作者:行者123 更新时间:2023-11-30 11:19:47 25 4
gpt4 key购买 nike

我已经将 spring 从 3.2.1 升级到 4.0.3

得到:

"Type 'org/springframework/http/MediaType' (current frame, stack[1]) is 
not assignable to 'org/springframework/util/MimeType'"

完整堆栈跟踪:

Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
org/springframework/web/servlet/mvc/condition/ProducesRequestCondition.compareMatchingMediaTypes(Lorg/springframework/web/servlet/mvc/condition/ProducesRequestCondition;ILorg/springframework/web/servlet/mvc/condition/ProducesRequestCondition;I)I @83: invokevirtual
Reason:
Type 'org/springframework/http/MediaType' (current frame, stack[1]) is not assignable to 'org/springframework/util/MimeType'
Current Frame:
bci: @83
flags: { }
locals: { 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition', 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition', integer, 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition', integer, integer, 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition$ProduceMediaTypeExpression', 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition$ProduceMediaTypeExpression' }
stack: { 'org/springframework/http/MediaType', 'org/springframework/http/MediaType' }
Bytecode:
0000000: 0336 051c 1504 9f00 0c15 041c 6436 05a7
0000010: 0049 1c02 9f00 442b b700 3b1c b900 3d02
0000020: 00c0 0006 3a06 2db7 003b 1504 b900 3d02
0000030: 00c0 0006 3a07 1906 1907 b600 4136 0515
0000040: 0599 0008 1505 a700 1019 06b6 0026 1907
0000050: b600 26b6 0042 3605 1505 ac
Stackmap Table:
append_frame(@18,Integer)
append_frame(@73,Object[#178],Object[#178])
same_locals_1_stack_item_frame(@86,Integer)
chop_frame(@88,2)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
org/springframework/web/servlet/mvc/condition/ProducesRequestCondition.compareMatchingMediaTypes(Lorg/springframework/web/servlet/mvc/condition/ProducesRequestCondition;ILorg/springframework/web/servlet/mvc/condition/ProducesRequestCondition;I)I @83: invokevirtual
Reason:
Type 'org/springframework/http/MediaType' (current frame, stack[1]) is not assignable to 'org/springframework/util/MimeType'
Current Frame:
bci: @83
flags: { }
locals: { 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition', 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition', integer, 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition', integer, integer, 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition$ProduceMediaTypeExpression', 'org/springframework/web/servlet/mvc/condition/ProducesRequestCondition$ProduceMediaTypeExpression' }
stack: { 'org/springframework/http/MediaType', 'org/springframework/http/MediaType' }
Bytecode:
0000000: 0336 051c 1504 9f00 0c15 041c 6436 05a7
0000010: 0049 1c02 9f00 442b b700 3b1c b900 3d02
0000020: 00c0 0006 3a06 2db7 003b 1504 b900 3d02
0000030: 00c0 0006 3a07 1906 1907 b600 4136 0515
0000040: 0599 0008 1505 a700 1019 06b6 0026 1907
0000050: b600 26b6 0042 3605 1505 ac
Stackmap Table:
append_frame(@18,Integer)
append_frame(@73,Object[#178],Object[#178])
same_locals_1_stack_item_frame(@86,Integer)
chop_frame(@88,2)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.createRequestMappingInfo(RequestMappingHandlerMapping.java:242)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.getMappingForMethod(RequestMappingHandlerMapping.java:191)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.getMappingForMethod(RequestMappingHandlerMapping.java:51)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$1.matches(AbstractHandlerMethodMapping.java:152)
at org.springframework.web.method.HandlerMethodSelector$1.doWith(HandlerMethodSelector.java:62)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:480)
at org.springframework.web.method.HandlerMethodSelector.selectMethods(HandlerMethodSelector.java:58)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:149)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:124)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:103)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:126)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 21 more

spring issues 隐藏在我的理解中,它可能是什么,从哪里开始搜索?

最佳答案

我认为,这不是升级问题。当您的应用程序服务器卡住时会发生这种情况。因此,您需要删除服务器并在服务器上运行。

关于java - 类型 'org/springframework/http/MediaType'(当前帧,堆栈 [1])不可分配给 'org/springframework/util/MimeType',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23082038/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com