2 xiebo0409 xiebo0409 于 2015.07.23 18:07 提问

spring4.1.7整合jackson时报无方法异常,求jackson-core-2.6.jar

java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.JavaType.isReferenceType()Z
at com.fasterxml.jackson.databind.ser.BasicSerializerFactory.findSerializerByLookup(BasicSerializerFactory.java:309)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._createSerializer2(BeanSerializerFactory.java:218)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:153)
at com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1199)
at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1153)
at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:481)
at com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap.findAndAddSecondarySerializer(PropertySerializerMap.java:90)
at com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase._findAndAddDynamic(AsArraySerializerBase.java:321)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:115)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130)
at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:2374)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal(AbstractJackson2HttpMessageConverter.java:231)
at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:208)
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:161)
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:101)
at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:185)
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:71)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

7个回答

CSDNXIAON
CSDNXIAON   2015.07.23 18:10

spring框架中的jackson解析json方法
----------------------同志你好,我是CSDN问答机器人小N,奉组织之命为你提供参考答案,编程尚未成功,同志仍需努力!

strutce
strutce   Ds   Rxr 2015.07.23 22:15

下载jar建议去maven仓库找和下载http://mvnrepository.com/ 还要很多地址自己网上找找

cuiwei1026522829
cuiwei1026522829   Ds   Rxr 2015.07.23 23:06
shuaijie456
shuaijie456   2016.01.22 13:51

楼主最后怎么解决的啊 麻烦有空回复下 多谢了 是换个jackson-databind包吗 我的是2.6.5的

oqqsoso123456
oqqsoso123456   2016.06.25 16:36
oqqsoso123456
oqqsoso123456   2016.06.25 16:36
danielinbiti
danielinbiti   Ds   Rxr 2015.07.23 18:09
danielinbiti
danielinbiti 回复xiebo0409: 2.6还真没试过,自己配4.0用的也是2.5的,还真没关注2.6和2.5不一样
接近 3 年之前 回复
xiebo0409
xiebo0409 回复danielinbiti: 已解决,是jackson-databind-2.6.0.jar少了那个方法.
接近 3 年之前 回复
danielinbiti
danielinbiti 回复xiebo0409: spring4用2.5的没问题
接近 3 年之前 回复
xiebo0409
xiebo0409 我去官方网站看过,分为3个包,其余两个包都是jackson-databind-2.6.0.jar,jackson-annotations-2.6.0.jar只有jackson-core-2.5.0.jar是2.5,官方并未提供2.6包,github未找到。
接近 3 年之前 回复
cuixiang081
cuixiang081 ![图片说明](http://img.ask.csdn.net/upload/201507/23/1437646579_221673.jpg)复cuixiang081:
接近 3 年之前 回复
cuixiang081
cuixiang081 回复cuixiang081: 顶
接近 3 年之前 回复
cuixiang081
cuixiang081 好顶,不错
接近 3 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
jackson-core-2.6.4.jar
jackson2,15年10月份更新,json格式转换
jackson-core-2.6.0.jar-sources-javadoc.zip jar包合集
jackson 2.6.0 java处理json需要的jar包 内包含文件: jackson-core-2.6.0.jar jackson-core-2.6.0-sources.jar jackson-core-2.6.0-javadoc.jar
spring和mybatis整合代码
spring4.1.7和mybatis3.4.0进行整合的示例代码
spring 整合jackson
1.首先添加jackson的jar包,jackson-all 2.在spring配置文件中添加jackson的相关配置。         class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">                                    
整合spring4.1.7和dorado5
由于公司项目采用了dorado5开发,所以我自己练习了下整合spring和dorado5构建了一个简单的项目。项目采用mysql数据库。dorado5好像只对ie兼容,所以浏览页面的时候推荐使用ie浏览器。 - 新建一个dorado项目。项目搭建请参考Dorado5深入浅出。在dorado的view目录的clazz属性里面添加上我们对应的java类Main.java。这个也是dorado链接后台
springMVC整合jackson
<!--start:使用Jackson 1.x的配置,需要导入的jar包:jackson-core-lpgl-xxx.jar、jackson-mapper-lgpl-xxx.jar --> <bean class ="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" > <proper
spring4.1.0+spring mvc4.1.0+spring data jpa1.7.0+maven整合
spring4.1.0+spring mvc4.1.0+spring data jpa1.7.0+maven整合 个人博客:http://www.loveweir.com/ spring4.1.0已经正式发布了,整合一下使用spring mvc和spring 的jpa,之前的另一个项目有用到,感觉挺好用的,有减少了很多工作量,而且用起来简单,今天在搭建一个最新的。 首先从ma
在整合hibernate时报异常
今天在整合hibernate的时候出现了下面异常,在网上查了一些文章 http://blog.csdn.net/cheng_feng_xiao_zhan/article/details/52541361 发现主要有几种情况: JAR未引入实体类中缺少无参构造函数其他原因 排查后,发现是我自己在entities和hbm.xml文件的属性名映射不正确,修改之后就ok了!
[Jackson] 使用ObjectMapper对含有任意key的JSON进行反序列化
使用ObjectMapper对含有任意key的JSON进行反序列化在调用某个RESTful API后,返回的JSON字符串中含有没有预先定义的key,和结构固定的JSON相比,它需要一些额外的操作。对于结构固定的JSON,使用ObjectMapper结合某个预先定义的实体类型可以非常方便地完成反序列化工作,比如对下面这样的JSON:GET /person/1{ "id": "1",
官方Spring 4.1.7
官网正版分享,不知道官网下载的请点击!下载地址分享:http://repo.spring.io/release/org/springframework/spring/ (分享)