java.lang.RuntimeException: Could not decode JSON

Spring JIRA | Pavel Bernshtam | 3 years ago
  1. 0

    I have a class with long field, which stores timestamp When I try read it from couchbase using CouchbaseRepository findOne() method I receive xception in thread "main" java.lang.RuntimeException: Could not decode JSON at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decode(JacksonTranslationService.java:125) at org.springframework.data.couchbase.core.CouchbaseTemplate.translateDecode(CouchbaseTemplate.java:83) at org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:163) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findOne(SimpleCouchbaseRepository.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy9.findOne(Unknown Source) at com.salespredict.CouchBaseClient.main(CouchBaseClient.java:11) Caused by: com.fasterxml.jackson.core.JsonParseException: Numeric value (1381061520766) out of range of int at [Source: java.io.StringReader@8e396; line: 1, column: 27] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1369) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599) at com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:847) at com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:643) at com.fasterxml.jackson.core.base.ParserMinimalBase.getValueAsInt(ParserMinimalBase.java:293) at com.fasterxml.jackson.core.JsonParser.getValueAsInt(JsonParser.java:1105) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decodePrimitive(JacksonTranslationService.java:201) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decodeObject(JacksonTranslationService.java:150) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decode(JacksonTranslationService.java:116)

    Spring JIRA | 3 years ago | Pavel Bernshtam
    java.lang.RuntimeException: Could not decode JSON
  2. 0

    I have a class with long field, which stores timestamp When I try read it from couchbase using CouchbaseRepository findOne() method I receive xception in thread "main" java.lang.RuntimeException: Could not decode JSON at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decode(JacksonTranslationService.java:125) at org.springframework.data.couchbase.core.CouchbaseTemplate.translateDecode(CouchbaseTemplate.java:83) at org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:163) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findOne(SimpleCouchbaseRepository.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy9.findOne(Unknown Source) at com.salespredict.CouchBaseClient.main(CouchBaseClient.java:11) Caused by: com.fasterxml.jackson.core.JsonParseException: Numeric value (1381061520766) out of range of int at [Source: java.io.StringReader@8e396; line: 1, column: 27] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1369) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599) at com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:847) at com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:643) at com.fasterxml.jackson.core.base.ParserMinimalBase.getValueAsInt(ParserMinimalBase.java:293) at com.fasterxml.jackson.core.JsonParser.getValueAsInt(JsonParser.java:1105) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decodePrimitive(JacksonTranslationService.java:201) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decodeObject(JacksonTranslationService.java:150) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decode(JacksonTranslationService.java:116)

    Spring JIRA | 3 years ago | Pavel Bernshtam
    java.lang.RuntimeException: Could not decode JSON
  3. 0

    GitHub comment 675#220547756

    GitHub | 7 months ago | nicolas-f
    com.fasterxml.jackson.core.JsonParseException: Numeric value (1463655908000) out of range of int at [Source: java.io.FileInputStream@6969bf2b; line: 18, column: 38]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JsonParseException on DataSiftPylon.sample(): topicIds not deserialized

    GitHub | 11 months ago | sosnut
    com.fasterxml.jackson.core.JsonParseException: Numeric value (119435464813984) out of range of int at [Source: java.io.StringReader@1e17c35d; line: 1, column: 1688]
  6. 0

    JsonParseException for CouchDB for Databases with > 20k records

    GitHub | 1 year ago | mittalvishesh
    java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Numeric value (8580617561) out of range of int at [Source: java.io.InputStreamReader@424e6790; line: 1, column: 170]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.fasterxml.jackson.core.JsonParseException

      Numeric value (1381061520766) out of range of int at [Source: java.io.StringReader@8e396; line: 1, column: 27]

      at com.fasterxml.jackson.core.JsonParser._constructError()
    2. Jackson-core
      JsonParser.getValueAsInt
      1. com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1369)
      2. com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599)
      3. com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:847)
      4. com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:643)
      5. com.fasterxml.jackson.core.base.ParserMinimalBase.getValueAsInt(ParserMinimalBase.java:293)
      6. com.fasterxml.jackson.core.JsonParser.getValueAsInt(JsonParser.java:1105)
      6 frames
    3. Spring Data Couchbase
      JacksonTranslationService.decode
      1. org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decodePrimitive(JacksonTranslationService.java:201)
      2. org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decodeObject(JacksonTranslationService.java:150)
      3. org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.decode(JacksonTranslationService.java:116)
      3 frames