com.google.gson.JsonSyntaxException

java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web243

  • via GitHub by sabrinawilske
    ,
  • Stack trace

    • com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT at com.google.gson.Gson.fromJson(Gson.java:817) at com.google.gson.Gson.fromJson(Gson.java:870) at com.google.gson.Gson.fromJson(Gson.java:843) at clarifai2.internal.InternalUtil.fromJson(InternalUtil.java:145) at clarifai2.dto.model.ModelVersion$Adapter$1.deserialize(ModelVersion.java:42) at clarifai2.dto.model.ModelVersion$Adapter$1.deserialize(ModelVersion.java:31) at clarifai2.internal.JSONAdapterFactory$Adapter.read(JSONAdapterFactory.java:173) at com.google.gson.Gson.fromJson(Gson.java:805) at com.google.gson.Gson.fromJson(Gson.java:870) at com.google.gson.Gson.fromJson(Gson.java:843) at clarifai2.internal.InternalUtil.fromJson(InternalUtil.java:145) at clarifai2.dto.model.Model$Adapter$2.deserialize(Model.java:211) at clarifai2.dto.model.Model$Adapter$2.deserialize(Model.java:197) at clarifai2.internal.JSONAdapterFactory$Adapter.read(JSONAdapterFactory.java:173) at com.google.gson.Gson.fromJson(Gson.java:805) at com.google.gson.Gson.fromJson(Gson.java:870) at clarifai2.api.request.model.GetModelRequest$1$1.fromJSON(GetModelRequest.java:34) at clarifai2.api.request.model.GetModelRequest$1$1.fromJSON(GetModelRequest.java:32) at clarifai2.api.request.ClarifaiRequest$Impl.executeSync(ClarifaiRequest.java:285) at clarifai2.api.request.ClarifaiRequest$Builder.executeSync(ClarifaiRequest.java:192) at clarifai2.dto.model.DefaultModels.update(DefaultModels.java:52) at clarifai2.dto.model.DefaultModels.access$000(DefaultModels.java:10) at clarifai2.dto.model.DefaultModels$1.run(DefaultModels.java:42) 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.IllegalStateException: Expected STRING but was BEGIN_OBJECT at com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:154) at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.read(TypeAdapters.java:741) at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.read(TypeAdapters.java:717) at com.google.gson.Gson.fromJson(Gson.java:805) ... 25 more

    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

    Unknown visitor
    Unknown visitorOnce,
    asvidasvid
    Once,
    jf-astjf-ast
    6 times, last one
    Hiren AmaliyarHiren Amaliyar
    2 times, last one
    Nikolay RybakNikolay Rybak
    9 times, last one
    46 more bugmates