com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT

GitHub | sabrinawilske | 3 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 30#271834685

    GitHub | 3 months ago | sabrinawilske
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT
  2. 0

    GitHub comment 30#271595462

    GitHub | 3 months ago | sabrinawilske
    java.lang.IllegalArgumentException: GSON cannot serialize clarifai2.dto.ClarifaiStatus
  3. 0

    Failed to invoke clarifai2.dto.ClarifaiStatus() with no args

    GitHub | 5 months ago | hackable
    java.lang.RuntimeException: Failed to invoke clarifai2.dto.ClarifaiStatus() with no args
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

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. java.lang.IllegalStateException

    Expected STRING but was BEGIN_OBJECT

    at com.google.gson.internal.bind.JsonTreeReader.nextString()
  2. Gson
    Gson.fromJson
    1. com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:154)
    2. com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.read(TypeAdapters.java:741)
    3. com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.read(TypeAdapters.java:717)
    4. com.google.gson.Gson.fromJson(Gson.java:805)
    5. com.google.gson.Gson.fromJson(Gson.java:870)
    6. com.google.gson.Gson.fromJson(Gson.java:843)
    6 frames
  3. clarifai2.internal
    InternalUtil.fromJson
    1. clarifai2.internal.InternalUtil.fromJson(InternalUtil.java:145)
    1 frame
  4. clarifai2.dto.model
    ModelVersion$Adapter$1.deserialize
    1. clarifai2.dto.model.ModelVersion$Adapter$1.deserialize(ModelVersion.java:42)
    2. clarifai2.dto.model.ModelVersion$Adapter$1.deserialize(ModelVersion.java:31)
    2 frames
  5. clarifai2.internal
    JSONAdapterFactory$Adapter.read
    1. clarifai2.internal.JSONAdapterFactory$Adapter.read(JSONAdapterFactory.java:173)
    1 frame
  6. Gson
    Gson.fromJson
    1. com.google.gson.Gson.fromJson(Gson.java:805)
    2. com.google.gson.Gson.fromJson(Gson.java:870)
    3. com.google.gson.Gson.fromJson(Gson.java:843)
    3 frames
  7. clarifai2.internal
    InternalUtil.fromJson
    1. clarifai2.internal.InternalUtil.fromJson(InternalUtil.java:145)
    1 frame
  8. clarifai2.dto.model
    Model$Adapter$2.deserialize
    1. clarifai2.dto.model.Model$Adapter$2.deserialize(Model.java:211)
    2. clarifai2.dto.model.Model$Adapter$2.deserialize(Model.java:197)
    2 frames
  9. clarifai2.internal
    JSONAdapterFactory$Adapter.read
    1. clarifai2.internal.JSONAdapterFactory$Adapter.read(JSONAdapterFactory.java:173)
    1 frame
  10. Gson
    Gson.fromJson
    1. com.google.gson.Gson.fromJson(Gson.java:805)
    2. com.google.gson.Gson.fromJson(Gson.java:870)
    2 frames
  11. clarifai2.api.request
    ClarifaiRequest$Builder.executeSync
    1. clarifai2.api.request.model.GetModelRequest$1$1.fromJSON(GetModelRequest.java:34)
    2. clarifai2.api.request.model.GetModelRequest$1$1.fromJSON(GetModelRequest.java:32)
    3. clarifai2.api.request.ClarifaiRequest$Impl.executeSync(ClarifaiRequest.java:285)
    4. clarifai2.api.request.ClarifaiRequest$Builder.executeSync(ClarifaiRequest.java:192)
    4 frames
  12. clarifai2.dto.model
    DefaultModels$1.run
    1. clarifai2.dto.model.DefaultModels.update(DefaultModels.java:52)
    2. clarifai2.dto.model.DefaultModels.access$000(DefaultModels.java:10)
    3. clarifai2.dto.model.DefaultModels$1.run(DefaultModels.java:42)
    3 frames
  13. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    3. java.lang.Thread.run(Unknown Source)
    3 frames