Closed rebelthor closed 8 years ago
Might be the fact that BitbucketClient.scala fetchPage calls
val nextPageStart = page.get("next").map(p => pageNr + 1)
And the API from bitbucket didn't returned a "next" field in the JSON, because there's only one page?
@rebelthor I don't think this error occurred because of the single-page result. The code fails when trying to determine the destination branch and the commit hash it's pointing to. Could you please have a look at your pull requests JSON and see if all the pull requests have a destination
, a commit
and a hash
field in it? Here's an example:
"destination": {
"commit": {
"hash": "e04099ba977c",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/bitbucket/bitbucket/commit/e04099ba977c"
}
}
},
Might be related to #28 . Could you please test the SNAPSHOT attached to that ticket too?
Hello!
We are trying to use the Sonar BitBucket plugin together with Gradle, however, even though authentication seems to work, we are receiving a NPE after receiving the pull request page as a json:
06-May-2016 10:42:37 Plug-in config: [PluginConfiguration](accountName=__removed_account_name__,repoSlug=__removed_repo_slug__,teamName=__removed_account_name__,apiKey=***,oauthTokenClientKey=null,oauthTokenClientSecret=null,branchName=__removed_branch_name__,approveUnApproveEnabled=true,minSeverity=MAJOR) 06-May-2016 10:42:37 06-May-2016 10:42:37 08:42:37.785 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Post-jobs : ch.mibex.bitbucket.sonar.review.SonarReviewPostJob@66f88fd3 06-May-2016 10:42:37 08:42:37.785 [INFO] [org.sonarqube.gradle.SonarQubeTask] Executing post-job ch.mibex.bitbucket.sonar.review.SonarReviewPostJob 06-May-2016 10:42:37 08:42:37.812 [INFO] [com.sun.jersey.api.client.filter.LoggingFilter] 1 * Client out-bound request 06-May-2016 10:42:37 1 > GET https://bitbucket.org/api/2.0/repositories/__removed_account_name__/__removed_repo_slug__/pullrequests?page=1&pagelen=50&state=OPEN 06-May-2016 10:42:37 1 > Accept: application/json 06-May-2016 10:42:37 1 > Content-Type: application/json 06-May-2016 10:42:37 1 > Authorization: Basic __removed_auth_token__ 06-May-2016 10:42:37 06-May-2016 10:42:38 08:42:38.018 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@352288bc7 pairs: {GET /api/2.0/repositories/__removed_account_name__/__removed_repo_slug__/pullrequests?page=1&pagelen=50&state=OPEN HTTP/1.1: null}{Accept: application/json}{Content-Type: application/json}{Authorization: Basic __removed_auth_token__}{User-Agent: Java/1.8.0_77}{Host: bitbucket.org}{Connection: keep-alive} 06-May-2016 10:42:38 08:42:38.109 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@33acec5e18 pairs: {null: HTTP/1.1 200 OK}{Server: nginx/1.6.2}{Vary: Authorization, Cookie}{Vary: Accept-Encoding}{Content-Type: application/json; charset=utf-8}{Strict-Transport-Security: max-age=31536000}{Date: Fri, 06 May 2016 08:42:38 GMT}{X-Served-By: app-110}{ETag: "c174abbe0fb581cd28501ba4032407e0"}{X-Static-Version: cee7bfdf65a1}{X-Content-Type-Options: nosniff}{X-Accepted-OAuth-Scopes: pullrequest}{X-Render-Time: 0.0764009952545}{Connection: keep-alive}{X-Request-Count: 322}{X-Version: cee7bfdf65a1}{X-Frame-Options: SAMEORIGIN}{Content-Length: 8958} 06-May-2016 10:42:38 08:42:38.117 [INFO] [com.sun.jersey.api.client.filter.LoggingFilter] 1 * Client in-bound response 06-May-2016 10:42:38 1 < 200 06-May-2016 10:42:38 1 < X-Accepted-OAuth-Scopes: pullrequest 06-May-2016 10:42:38 1 < Server: nginx/1.6.2 06-May-2016 10:42:38 1 < X-Content-Type-Options: nosniff 06-May-2016 10:42:38 1 < Connection: keep-alive 06-May-2016 10:42:38 1 < X-Static-Version: cee7bfdf65a1 06-May-2016 10:42:38 1 < X-Version: cee7bedf65a1 06-May-2016 10:42:38 1 < Date: Fri, 06 May 2016 08:42:38 GMT 06-May-2016 10:42:38 1 < X-Frame-Options: SAMEORIGIN 06-May-2016 10:42:38 1 < Strict-Transport-Security: max-age=31536000 06-May-2016 10:42:38 1 < X-Render-Time: 0.0764009952545 06-May-2016 10:42:38 1 < ETag: "c174abbe0fb341cd28501ba4032407e0" 06-May-2016 10:42:38 1 < X-Served-By: app-110 06-May-2016 10:42:38 1 < Vary: Accept-Encoding 06-May-2016 10:42:38 1 < Vary: Authorization, Cookie 06-May-2016 10:42:38 1 < Content-Length: 8958 06-May-2016 10:42:38 1 < X-Request-Count: 322 06-May-2016 10:42:38 1 < Content-Type: application/json; charset=utf-8 06-May-2016 10:42:38 1 < 06-May-2016 10:42:38 {"pagelen": 50, "values": [{"description": "* SonarQube gradle configuration - phase 1\r\n\r\n* SonarQube gradle configuration - phase 2\r\n\r\n* try to fix an error in bamboo: \"Updated value for ... json removed for security reasons ... }, "created_on": "2016-03-18T13:14:14.419801+00:00", "reason": "", "updated_on": "2016-04-01T14:39:28.338581+00:00", "type": "pullrequest", "id": 5550, "task_count": 0}], "page": 1, "size": 3} 06-May-2016 10:42:38 06-May-2016 10:42:38 08:42:38.196 [INFO] [org.sonarqube.gradle.SonarQubeTask] Analysis report generated in /home/bamboo/bamboo-agent-home/xml-data/build-dir/__removed_repo_slug__-OT-SQ/build/sonar/batch-report 06-May-2016 10:42:38 08:42:38.201 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':sonarqube' 06-May-2016 10:42:38 08:42:38.201 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :sonarqube FAILED 06-May-2016 10:42:38 08:42:38.202 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :sonarqube (Thread[main,5,main]) completed. Took 14.42 secs. 06-May-2016 10:42:38 08:42:38.202 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 14.42 secs, idle: 0.0 secs 06-May-2016 10:42:38 08:42:38.209 [ERROR] [org.gradle.BuildExceptionReporter] 06-May-2016 10:42:38 08:42:38.210 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 06-May-2016 10:42:38 08:42:38.211 [ERROR] [org.gradle.BuildExceptionReporter] 06-May-2016 10:42:38 08:42:38.211 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 06-May-2016 10:42:38 08:42:38.211 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':sonarqube'. 06-May-2016 10:42:38 08:42:38.211 [ERROR] [org.gradle.BuildExceptionReporter] > java.lang.NullPointerException (no error message) 06-May-2016 10:42:38 08:42:38.212 [ERROR] [org.gradle.BuildExceptionReporter] 06-May-2016 10:42:38 08:42:38.212 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 06-May-2016 10:42:38 08:42:38.213 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'. 06-May-2016 10:42:38 08:42:38.213 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) 06-May-2016 10:42:38 08:42:38.213 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) 06-May-2016 10:42:38 08:42:38.214 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) 06-May-2016 10:42:38 08:42:38.214 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) 06-May-2016 10:42:38 08:42:38.214 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) 06-May-2016 10:42:38 08:42:38.214 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52) 06-May-2016 10:42:38 08:42:38.214 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 06-May-2016 10:42:38 08:42:38.214 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) 06-May-2016 10:42:38 08:42:38.215 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 06-May-2016 10:42:38 08:42:38.215 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203) 06-May-2016 10:42:38 08:42:38.215 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185) 06-May-2016 10:42:38 08:42:38.215 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:62) 06-May-2016 10:42:38 08:42:38.215 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50) 06-May-2016 10:42:38 08:42:38.215 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25) 06-May-2016 10:42:38 08:42:38.215 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110) 06-May-2016 10:42:38 08:42:38.216 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) 06-May-2016 10:42:38 08:42:38.216 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) 06-May-2016 10:42:38 08:42:38.216 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23) 06-May-2016 10:42:38 08:42:38.216 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43) 06-May-2016 10:42:38 08:42:38.216 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) 06-May-2016 10:42:38 08:42:38.216 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) 06-May-2016 10:42:38 08:42:38.216 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) 06-May-2016 10:42:38 08:42:38.217 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154) 06-May-2016 10:42:38 08:42:38.217 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22) 06-May-2016 10:42:38 08:42:38.217 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) 06-May-2016 10:42:38 08:42:38.217 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52) 06-May-2016 10:42:38 08:42:38.217 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151) 06-May-2016 10:42:38 08:42:38.217 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32) 06-May-2016 10:42:38 08:42:38.217 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99) 06-May-2016 10:42:38 08:42:38.218 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93) 06-May-2016 10:42:38 08:42:38.218 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) 06-May-2016 10:42:38 08:42:38.218 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62) 06-May-2016 10:42:38 08:42:38.218 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93) 06-May-2016 10:42:38 08:42:38.218 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82) 06-May-2016 10:42:38 08:42:38.218 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94) 06-May-2016 10:42:38 08:42:38.218 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) 06-May-2016 10:42:38 08:42:38.219 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) 06-May-2016 10:42:38 08:42:38.219 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43) 06-May-2016 10:42:38 08:42:38.219 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) 06-May-2016 10:42:38 08:42:38.219 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77) 06-May-2016 10:42:38 08:42:38.219 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47) 06-May-2016 10:42:38 08:42:38.219 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51) 06-May-2016 10:42:38 08:42:38.219 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28) 06-May-2016 10:42:38 08:42:38.220 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43) 06-May-2016 10:42:38 08:42:38.220 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170) 06-May-2016 10:42:38 08:42:38.220 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) 06-May-2016 10:42:38 08:42:38.220 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) 06-May-2016 10:42:38 08:42:38.220 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) 06-May-2016 10:42:38 08:42:38.220 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) 06-May-2016 10:42:38 08:42:38.220 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) 06-May-2016 10:42:38 08:42:38.221 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) 06-May-2016 10:42:38 08:42:38.221 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) 06-May-2016 10:42:38 08:42:38.221 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) 06-May-2016 10:42:38 08:42:38.221 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33) 06-May-2016 10:42:38 08:42:38.221 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) 06-May-2016 10:42:38 08:42:38.221 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) 06-May-2016 10:42:38 08:42:38.221 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) 06-May-2016 10:42:38 08:42:38.221 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23) 06-May-2016 10:42:38 08:42:38.222 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) 06-May-2016 10:42:38 08:42:38.222 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) 06-May-2016 10:42:38 08:42:38.222 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56) 06-May-2016 10:42:38 08:42:38.222 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NullPointerException 06-May-2016 10:42:38 08:42:38.222 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient$$anonfun$1$$anonfun$apply$1.apply(BitbucketClient.scala:62) 06-May-2016 10:42:38 08:42:38.222 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient$$anonfun$1$$anonfun$apply$1.apply(BitbucketClient.scala:57) 06-May-2016 10:42:38 08:42:38.222 [ERROR] [org.gradle.BuildExceptionReporter] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245) 06-May-2016 10:42:38 08:42:38.223 [ERROR] [org.gradle.BuildExceptionReporter] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245) 06-May-2016 10:42:38 08:42:38.223 [ERROR] [org.gradle.BuildExceptionReporter] at scala.collection.immutable.List.foreach(List.scala:381) 06-May-2016 10:42:38 08:42:38.223 [ERROR] [org.gradle.BuildExceptionReporter] at scala.collection.TraversableLike$class.map(TraversableLike.scala:245) 06-May-2016 10:42:38 08:42:38.223 [ERROR] [org.gradle.BuildExceptionReporter] at scala.collection.immutable.List.map(List.scala:285) 06-May-2016 10:42:38 08:42:38.223 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient$$anonfun$1.apply(BitbucketClient.scala:57) 06-May-2016 10:42:38 08:42:38.223 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient$$anonfun$1.apply(BitbucketClient.scala:56) 06-May-2016 10:42:38 08:42:38.223 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient.fetchPage(BitbucketClient.scala:212) 06-May-2016 10:42:38 08:42:38.223 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient.ch$mibex$bitbucket$sonar$client$BitbucketClient$$fetchPullRequestsPage$1(BitbucketClient.scala:55) 06-May-2016 10:42:38 08:42:38.224 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient$$anonfun$findPullRequestsWithSourceBranch$1.apply(BitbucketClient.scala:72) 06-May-2016 10:42:38 08:42:38.224 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient$$anonfun$findPullRequestsWithSourceBranch$1.apply(BitbucketClient.scala:71) 06-May-2016 10:42:38 08:42:38.224 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient.forEachResultPage(BitbucketClient.scala:219) 06-May-2016 10:42:38 08:42:38.224 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.client.BitbucketClient.findPullRequestsWithSourceBranch(BitbucketClient.scala:71) 06-May-2016 10:42:38 08:42:38.224 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.findPullRequestsForConfiguredBranch(SonarReviewPostJob.scala:36) 06-May-2016 10:42:38 08:42:38.224 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.executeOn(SonarReviewPostJob.scala:18) 06-May-2016 10:42:38 08:42:38.224 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:65) 06-May-2016 10:42:38 08:42:38.225 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55) 06-May-2016 10:42:38 08:42:38.225 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:87) 06-May-2016 10:42:38 08:42:38.225 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:189) 06-May-2016 10:42:38 08:42:38.225 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) 06-May-2016 10:42:38 08:42:38.225 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) 06-May-2016 10:42:38 08:42:38.225 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:265) 06-May-2016 10:42:38 08:42:38.225 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:260) 06-May-2016 10:42:38 08:42:38.225 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:250) 06-May-2016 10:42:38 08:42:38.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) 06-May-2016 10:42:38 08:42:38.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ProjectScanContainer.startComponents(ProjectScanContainer.java:128) 06-May-2016 10:42:38 08:42:38.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) 06-May-2016 10:42:38 08:42:38.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55) 06-May-2016 10:42:38 08:42:38.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86) 06-May-2016 10:42:38 08:42:38.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) 06-May-2016 10:42:38 08:42:38.229 [LIFECYCLE] [org.gradle.BuildResultLogger] 06-May-2016 10:42:38 08:42:38.229 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED 06-May-2016 10:42:38 08:42:38.229 [LIFECYCLE] [org.gradle.BuildResultLogger] 06-May-2016 10:42:38 08:42:38.229 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 20.543 secs 06-May-2016 10:42:38 08:42:38.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) 06-May-2016 10:42:38 08:42:38.227 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:124) 06-May-2016 10:42:38 08:42:38.227 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119) 06-May-2016 10:42:38 08:42:38.227 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62) 06-May-2016 10:42:38 08:42:38.227 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) 06-May-2016 10:42:38 08:42:38.227 [ERROR] [org.gradle.BuildExceptionReporter] at com.sun.proxy.$Proxy51.execute(Unknown Source) 06-May-2016 10:42:38 08:42:38.227 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240) 06-May-2016 10:42:38 08:42:38.227 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151) 06-May-2016 10:42:38 08:42:38.227 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:84) 06-May-2016 10:42:38 08:42:38.228 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) 06-May-2016 10:42:38 08:42:38.228 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227) 06-May-2016 10:42:38 08:42:38.228 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220) 06-May-2016 10:42:38 08:42:38.228 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209) 06-May-2016 10:42:38 08:42:38.228 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585) 06-May-2016 10:42:38 08:42:38.228 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568) 06-May-2016 10:42:38 08:42:38.228 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) 06-May-2016 10:42:38 08:42:38.228 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) 06-May-2016 10:42:38 08:42:38.229 [ERROR] [org.gradle.BuildExceptionReporter] ... 60 more 06-May-2016 10:42:38 08:42:38.229 [ERROR] [org.gradle.BuildExceptionReporter]
Please note that some information has been redacted for security reasons. Also, the JSON we receive is correct, contains the pull requests, and has been validated so the auth is working fine.
The way we call this plugin is through gradle:
./gradlew sonarqube -x test --stacktrace \ -Dsonar.projectVersion=${bamboo.repository.branch.name} \ -Dsonar.analysis.mode=issues \ -Dsonar.bitbucket.repoSlug=__removed_repo_slug__ \ -Dsonar.bitbucket.accountName=__removed_account_name \ -Dsonar.bitbucket.teamName=__removed_team_name__ \ -Dsonar.bitbucket.apiKey=__removed_api_key__ \ -Dsonar.bitbucket.branchName=${bamboo.repository.git.branch} \ -Dsonar.host.url=http://sonar_url:9000/ \ -Dsonar.login=admin \ -Dsonar.password=sonar_password \ -Dsonar.analysis.mode=issues \ -Dsonar.verbose=true
Is this something we can fix, or a bug in the plugin?
Thank you!