- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经将 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/
我看到 @products 注释允许我传递单个字符串和字符串列表。所以我只是想知道这是如何在java中完成的,如果我需要使用允许以下行为的方法来实现它,我该怎么做?或者这个注释是特定的,所以我们不能在
我需要创建一个 REST 服务(Jersey),它接受 header 为“application/com.foo+xml”(+json,如果是 JSON mime 类型)。 有什么办法可以拥有吗?@P
我有一个使用 XML 和 JSON 的 Web 服务。 输出当前始终采用 XML 格式。 是否可以使用与所使用的 MediaType 相同的 MediaType 生成响应? 我需要的是: 请求是 XM
一旦我得到这个问题 Latest Jersey example does not work 的答案,我就遇到了另一个奇怪的问题: 服务器,GET 方法工作正常。我测试并添加了一些测试代码 hellow
我正在使用 Jersey 启用 JacksonFeature 编写 REST 客户端,用于强制我指定其自定义命名内容类型的 Web 服务,即使它只是常规 JSON。换句话说,当我这样做时: Reque
我正在使用 ReSTLet 来实现一个简单的 RESTful API,它为我提供了一个 org.reSTLet.data.MediaType 作为 ContentType。但是,我正在尝试使用其他一些
我使用 symfony 3.4 和奏鸣曲媒体包。在表单中使用 MediaType 效果很好,如下所示: $this->builder->->add('document', MediaType::cla
我正在使用 ReSTLet 构建某种代理服务器,但是我遇到了一个问题,即没有根据客户端请求自动确定 MediaType 的方法。 这是我的代码: Representation entity = nul
创建多部分/相关请求时。我们需要在 Content-Type 字符串中添加一个额外的 type=MIME_TYPE 内容类型应该是这样的 Content-Type: multipart/related
我的 SpringBoot 应用程序向外部 API 发出 HTTP 请求,所有这些都使用/生成 JSON。默认情况下,我的应用程序使用 Jackson 进行数据绑定(bind),并且所有 HTTP 请
6天前,我问了这个问题: how to select from filtervalues where genre comma delimited values contain only what is
我创建了一个示例客户端/服务器应用程序来熟悉 Spring Webflux/Reactor Netty。现在,当响应包含 Flux 并且媒体类型为“文本/事件流”时,我对客户端的行为有点困惑。我可以看
我有 Spring Rest Controller ,如下: @RestController @RequestMapping(value = "/v1/files") public class Dat
我创建了一个使用 REST 服务器进行 CRUD 操作的 Web 应用程序。我使用 java Jersey 和 gradle。当我执行 POST 操作时,我以 JSON 格式发送对象,如下所示: To
我只使用照片模式,但从 2019 年 Spring 开始,苹果商店要求获得微观许可。当用户只使用照片时,授予 micro 权限会非常困惑。这个问题有什么解决方法吗? 最佳答案 可能需要麦克风权限,因为
我正在构建我的第一个 API。 GET 请求有效,但我陷入了 POST 请求,并出现错误 415 不支持的媒体类型。经过一番查找和重写代码,仍然失败。有人明白为什么吗?参数值为: -String us
我目前正在开发一个由其他团队维护的项目,现在我需要维护它。当我完成该项目时,我发现了以下一些内容: 在 jax-rs Controller 中,它由 @Consumes(MediaType.APPLI
我遇到了一个奇怪的问题。我有一个 Web 项目(java 服务),我用 ANT 构建它。然而由于某些原因,构建系统不得不更改为Maven。 使用 Maven 构建后,我将 war 文件部署到 tomc
我目前正在开发一些 RESTful API 的版本 2,为了保持与版本 1 的兼容性,我想将该版本作为媒体类型参数添加到所有请求/响应中。 版本1:接受:application/json、applic
如何为具有自定义 MediaType 的实体发送 GET 请求? 例如,我想检索 MyUserDTO 并将 MediaType 设置为 application/user+yml。 现在我有两个独立的
我是一名优秀的程序员,十分优秀!