Seeing "Can not deserialize instance of ActivationId out of START_ARRAY token" error while querying view.

29 views
Skip to first unread message

ratn...@qualtrics.com

unread,
Jul 26, 2019, 7:03:53 PM7/26/19
to ektorp-discuss
Here is my code,

ViewQuery query = new ViewQuery()
.designDocId(activationDesignDocId)
.viewName(activationViewName)
.limit(5)
.includeDocs(false)
.startKey(startKey)
.endKey(endKey)
.staleOk(true)
.descending(false);
List<ActivationId> activationIds = dbConnector.queryView(query, ActivationId.class);



ActivationId - Class
@JsonIgnoreProperties({"id", "revision"})
public class ActivationId {
    @SuppressWarnings("unused")
    private String id;
    private String revision;
    private String key;
    private boolean _deleted;

    @JsonProperty("_id")
    public String getId() {
        return id;
    }
    @JsonProperty("_id")
    public void setId(String s) {
        id = s;
    }
    @JsonProperty("_rev")
    public String getRevision() {
        return revision;
    }
    @JsonProperty("_rev")
    public void setRevision(String s) {
        revision = s;
    }

    public String getKey() { return key; }
    public boolean get_deleted() {
        return this._deleted;
    }
    public void set_Deleted(boolean deleted) {
        this._deleted = deleted;
    }
    public void setKey(String key) { this.key = key;}

}


I see exception "Can not deserialize instance of ActivationId out of START_ARRAY token"

David Provan

unread,
Jul 28, 2019, 1:07:49 AM7/28/19
to ektorp-discuss
Why have you got includeDocs set to false? Does it work when you set that to be true?

If that doesn't fix it, my guess is that your query is failing, step 1 would be to hit the db directly with your query params and make sure you get a response that looks valid.

If it still fails reply back

Reply all
Reply to author
Forward
0 new messages