org.jboss.resteasy.spi.BadRequestException: Could not find message body reader for type:

16人阅读 评论(0) 收藏 举报
分类:

上面是用resteasy时碰到的问题,搜遍了国内内外大小网站,发现资料甚少,所以在此添加一波,见下图:这里写图片描述

这个问题在于 最后的参数,其实就是无法识别请求的json参数,按道理讲,应该是自动识别的,吧json 转成对象,从而走进处理逻辑里面。我添加了无数个相关依赖,后来发现,在指定的业务实现层添加这个pom 依赖就OK了,之前一个外国论坛也有说过,但是没说添加位置,这里强调下,发到web模块下的pom 文件就OK了。pom 依赖的版本和这个一样吧:

       <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson-provider</artifactId>
            <version>2.3.4.Final</version>
        </dependency>
查看评论

严重: No message body writer has been found for class java.util.ArrayList, ContentType: application/xm

这几天,在用CXF做一个从内网数据库读取信息到外网数据库时,出现了一个错误:如下 严重: No message body writer has been found for class java.ut...
  • zhangshufei8001
  • zhangshufei8001
  • 2016-07-26 08:55:15
  • 4854

resteasy返回错误Could not find MessageBodyWriter for response object of type

自己写一个restful的demo的时候遇到一个问题,就是返回错误信息Could not find MessageBodyWriter for response object of type 网上查...
  • ll840768874
  • ll840768874
  • 2016-10-21 21:28:45
  • 1541

Jersey生成Json响应的配置

我在生成text响应是是没有问题的: @Path("myresource") public class MyResource { @GET @Produces("text/plain") p...
  • javacloudfei
  • javacloudfei
  • 2014-08-13 14:22:10
  • 9781

jersey Rest请求URI路径构造

https://jersey.java.net/nonav/documentation/latest/user-guide.html Table of Contents Preface1....
  • zeng_84_long
  • zeng_84_long
  • 2013-06-02 12:15:01
  • 15364

FAQ(14):Could not find result map com.smbms.entities.User

FAQ(7):Could not find result map com.smbms.entities.User
  • qq_29166327
  • qq_29166327
  • 2017-12-16 10:10:43
  • 104

could not found expected ':' in 'reader', line 25, column 1: storm.zookeeper.port:2181

could not found expected ':' in 'reader', line 25, column 1: storm.zookeeper.port:2181
  • u012386311
  • u012386311
  • 2016-04-26 21:56:37
  • 2570

调用ejb+Resteasy的rest服务报错:Could not find MessageBodyWriter

Could not find MessageBodyWriter for response object of type: java.util.ArrayList 解决办法:war包要包含提供res...
  • earthhour
  • earthhour
  • 2013-11-04 22:29:38
  • 2932

OAF Could not find the specified responsibility.

今天做oaf 的hello world的例子 出现以下问题
  • weigotopro
  • weigotopro
  • 2014-07-22 16:40:26
  • 1324

Could not find bundle: org.eclipse.equinox.console

问题 描述: org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console 解决方案...
  • pzw_0612
  • pzw_0612
  • 2015-12-27 15:44:19
  • 1036

java错误:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu

我们在用Eclipse进行Java web开发时,可能会出现这样的错误:The superclass javax.servlet.http.HttpServlet was not found on t...
  • irizhao
  • irizhao
  • 2018-03-05 18:38:03
  • 39
    个人资料
    专栏达人 持之以恒
    等级:
    访问量: 114万+
    积分: 9505
    排名: 2394
    博客专栏
    最新评论