I'm using this wrapper in combination with a custom Hygieia collector. When requesting all the projects available I get an error.
Code snippet where I'm calling the wrapper.
LOG.info("Retreiving projects from: " + instanceUrl + " with token: " + apiKey); gitLabApi = GitlabAPI.connect(instanceUrl, apiKey); LOG.info("Connected to GitLab"); List<GitlabProject> projectsList = null; projectsList = gitLabApi.getProjects(); LOG.info("List of projects retrieved: " + projectsList.size()); return projectsList;
Error I get when running the collector
2018-10-24 11:41:06,480 ERROR o.s.s.s.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task. java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:402) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.http.GitlabHTTPRequestor.access$200(GitlabHTTPRequestor.java:35) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:256) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.http.GitlabHTTPRequestor$1.hasNext(GitlabHTTPRequestor.java:217) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.http.GitlabHTTPRequestor.getAll(GitlabHTTPRequestor.java:185) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.GitlabAPI.getProjects(GitlabAPI.java:665) ~[java-gitlab-api-4.0.0.jar!/:na] at com.capitalone.dashboard.collector.DefaultGitLabClient.getProjects(DefaultGitLabClient.java:120) ~[gitlab-build-collector-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at com.capitalone.dashboard.collector.DefaultGitLabClient.getInstanceJobs(DefaultGitLabClient.java:82) ~[gitlab-build-collector-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at com.capitalone.dashboard.collector.GitLabCollectorTask.collect(GitLabCollectorTask.java:105) ~[gitlab-build-collector-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at com.capitalone.dashboard.collector.GitLabCollectorTask.collect(GitLabCollectorTask.java:41) ~[gitlab-build-collector-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at com.capitalone.dashboard.collector.CollectorTask.run(CollectorTask.java:63) ~[core-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-4.2.5.RELEASE.jar!/:4.2.5.RELEASE] at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-4.2.5.RELEASE.jar!/:4.2.5.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_181] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_181] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_181] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_181] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
Any thoughts on what is going wrong? I used version 4.0.0 and 4.1.0 to see if that helped but it did not so far. Below is the Gitlab version we have.
GitLab 11.3.4-ee (14d3a1d) GitLab Shell 8.3.3 GitLab Workhorse v6.1.0 GitLab API v4
I'm using this wrapper in combination with a custom Hygieia collector. When requesting all the projects available I get an error.
Code snippet where I'm calling the wrapper.
LOG.info("Retreiving projects from: " + instanceUrl + " with token: " + apiKey); gitLabApi = GitlabAPI.connect(instanceUrl, apiKey); LOG.info("Connected to GitLab"); List<GitlabProject> projectsList = null; projectsList = gitLabApi.getProjects(); LOG.info("List of projects retrieved: " + projectsList.size()); return projectsList;
Error I get when running the collector
2018-10-24 11:41:06,480 ERROR o.s.s.s.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task. java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:402) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.http.GitlabHTTPRequestor.access$200(GitlabHTTPRequestor.java:35) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:256) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.http.GitlabHTTPRequestor$1.hasNext(GitlabHTTPRequestor.java:217) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.http.GitlabHTTPRequestor.getAll(GitlabHTTPRequestor.java:185) ~[java-gitlab-api-4.0.0.jar!/:na] at org.gitlab.api.GitlabAPI.getProjects(GitlabAPI.java:665) ~[java-gitlab-api-4.0.0.jar!/:na] at com.capitalone.dashboard.collector.DefaultGitLabClient.getProjects(DefaultGitLabClient.java:120) ~[gitlab-build-collector-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at com.capitalone.dashboard.collector.DefaultGitLabClient.getInstanceJobs(DefaultGitLabClient.java:82) ~[gitlab-build-collector-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at com.capitalone.dashboard.collector.GitLabCollectorTask.collect(GitLabCollectorTask.java:105) ~[gitlab-build-collector-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at com.capitalone.dashboard.collector.GitLabCollectorTask.collect(GitLabCollectorTask.java:41) ~[gitlab-build-collector-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at com.capitalone.dashboard.collector.CollectorTask.run(CollectorTask.java:63) ~[core-2.0.5-SNAPSHOT.jar!/:2.0.5-SNAPSHOT] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-4.2.5.RELEASE.jar!/:4.2.5.RELEASE] at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-4.2.5.RELEASE.jar!/:4.2.5.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_181] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_181] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_181] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_181] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
Any thoughts on what is going wrong? I used version 4.0.0 and 4.1.0 to see if that helped but it did not so far. Below is the Gitlab version we have.
GitLab 11.3.4-ee (14d3a1d) GitLab Shell 8.3.3 GitLab Workhorse v6.1.0 GitLab API v4