java.lang.RuntimeException

Could not decode JSON

Samebug tips4

You're inputing information in a way the Json Parser can't understand. This page might enlighten you a little: https://goo.gl/g5wrvy


rafaelrafael

Check if you forgot to set the "data" field inside your request. If you did set it, check if it's being serialized before sending, and if it's being serialized the right way.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web336

  • via Unknown by Pavel Bernshtam,
  • via Unknown by Pavel Bernshtam,
  • via GitHub by nicolas-f
    ,
  • Stack trace

    • 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)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    AxeloAxelo
    Once,
    zsambokizsamboki
    2 times, last one
    musketyrmusketyr
    36 times, last one
    Михайло ТітовМихайло Тітов
    Nikolay RybakNikolay Rybak
    Once,
    109 more bugmates