Skip to content

Regression on JSON issues in 4.11.11? "Cannot deserialize instance of java.util.ArrayList out of START_OBJECT token" #396

@hamishcunningham

Description

@hamishcunningham

hi, I seem to have a similar problem to #331 on 4.11.11 triggered with this code:

  GitLabApi gitLabApi = new GitLabApi(
    GitLabApi.ApiVersion.OAUTH2_CLIENT, 
    "https://gitlab.com",
    "my access token"
  );
  List<Project> projects = gitLabApi.getProjectApi().getProjects();

I get:

Exception in thread "main" org.gitlab4j.api.GitLabApiException: Cannot deserialize instance of
java.util.ArrayList out of START_OBJECT token
at [Source: (org.glassfish.jersey.client.internal.HttpUrlConnector$2); line: 1, column: 1]
at org.gitlab4j.api.Pager.(Pager.java:93)
at org.gitlab4j.api.ProjectApi.getProjects(ProjectApi.java:106)
at org.gitlab4j.api.ProjectApi.getProjects(ProjectApi.java:78)
at org.gitlab4j.api.ProjectApi$getProjects.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119)
at marking.GitRepo.connect(App.groovy:154)
at marking.GitRepo$connect$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119)

Any ideas? Tnx!

Originally posted by @hamishcunningham in #331 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions