timols / java-gitlab-api

A wrapper for the Gitlab API written in Java
Apache License 2.0
387 stars 317 forks source link

Delete note does not work #321

Closed tomasbjerre closed 6 years ago

tomasbjerre commented 6 years ago

Same problem as in deleting user: https://github.com/timols/java-gitlab-api/issues/248

I'm getting:

org.gitlab.api.GitlabAPIException
    at org.gitlab.api.http.GitlabHTTPRequestor.handleAPIError(GitlabHTTPRequestor.java:432)
    at org.gitlab.api.http.GitlabHTTPRequestor.to(GitlabHTTPRequestor.java:170)
    at org.gitlab.api.http.GitlabHTTPRequestor.to(GitlabHTTPRequestor.java:139)
    at org.gitlab.api.GitlabAPI.deleteNote(GitlabAPI.java:1671)
    at se.bjurr.violations.comments.gitlab.lib.GitLabCommentsProvider.removeComments(GitLabCommentsProvider.java:172)
    at se.bjurr.violations.comments.lib.CommentsCreator.removeOldCommentsThatAreNotStillReported(CommentsCreator.java:152)
    at se.bjurr.violations.comments.lib.CommentsCreator.createCommentWithAllSingleFileComments(CommentsCreator.java:92)
    at se.bjurr.violations.comments.lib.CommentsCreator.createComments(CommentsCreator.java:64)
    at se.bjurr.violations.comments.lib.CommentsCreator.createComments(CommentsCreator.java:39)
    at se.bjurr.violations.comments.gitlab.lib.ViolationCommentsToGitLabApi.toPullRequest(ViolationCommentsToGitLabApi.java:161)
    at se.bjurr.violations.comments.github.maven.ViolationCommentsMojo.execute(ViolationCommentsMojo.java:133)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]
    at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
    at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3607)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3547)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2578)
    at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:393)
    at org.gitlab.api.http.GitlabHTTPRequestor.to(GitlabHTTPRequestor.java:168)
    ... 31 more

Originally reported here: https://github.com/tomasbjerre/violation-comments-to-gitlab-maven-plugin/issues/3