Reputation: 197
when running a analysis, on client side the analysis is SUCCESSFUL. In server side it fails with
2015.11.21 18:58:54 ERROR [o.s.s.c.t.CeWorkerRunnableImpl] Failed to execute task AVEq-_POC3ZgM3TJ4WGx java.lang.IllegalArgumentException: Constant/issue functions must only have a non empty offset at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:125) ~[sonar-plugin-api-5.2.jar:na] at org.sonar.api.server.debt.internal.DefaultDebtRemediationFunction.validate(DefaultDebtRemediationFunction.java:88) ~[sonar-plugin-api-5.2.jar:na] at org.sonar.api.server.debt.internal.DefaultDebtRemediationFunction.(DefaultDebtRemediationFunction.java:45) ~[sonar-plugin-api-5.2.jar:na] at org.sonar.server.computation.issue.RuleImpl.effectiveRemediationFunction(RuleImpl.java:124) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.issue.RuleImpl.(RuleImpl.java:53) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.issue.RuleRepositoryImpl.loadRulesFromDb(RuleRepositoryImpl.java:102) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.issue.RuleRepositoryImpl.ensureInitialized(RuleRepositoryImpl.java:91) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.issue.RuleRepositoryImpl.findByKey(RuleRepositoryImpl.java:62) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.step.LoadQualityProfilesStep$IsValid.apply(LoadQualityProfilesStep.java:70) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.step.LoadQualityProfilesStep$IsValid.apply(LoadQualityProfilesStep.java:67) ~[sonar-server-5.2.jar:na] at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647) ~[guava-17.0.jar:na] at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-17.0.jar:na] at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-17.0.jar:na] at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:268) ~[guava-17.0.jar:na] at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:226) ~[guava-17.0.jar:na] at com.google.common.collect.FluentIterable.toList(FluentIterable.java:334) ~[guava-17.0.jar:na] at org.sonar.server.computation.step.LoadQualityProfilesStep.execute(LoadQualityProfilesStep.java:63) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:39) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:53) ~[sonar-server-5.2.jar:na] at org.sonar.server.computation.taskprocessor.CeWorkerRunnableImpl.executeTask(CeWorkerRunnableImpl.java:78) [sonar-server-5.2.jar:na] at org.sonar.server.computation.taskprocessor.CeWorkerRunnableImpl.run(CeWorkerRunnableImpl.java:55) [sonar-server-5.2.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_66] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_66] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_66] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_66] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66] 2015.11.21 18:58:54 ERROR [o.s.s.c.t.CeWorkerRunnableImpl] Executed task | project=Trimble.Connect:Desktop:master | id=AVEq-_POC3ZgM3TJ4WGx | time=721ms
How can i know what is the rule that is having the incorrect debt values.
thanks
Upvotes: 0
Views: 257
Reputation: 1
I encountered this problem with SonarQube 5.4. I was able to correct it by executing the following query against the sonar database.
DELETE from sonar.rules where status = 'REMOVED'
I assume this might change debt calculated for old projects.
Upvotes: 0
Reputation: 197
i finally figure out this by patching sonarqube to tell me what rule it was, see commit
Finally i found it was related with some compiler rules from c++ plugin that were renamed to compiler specific rules and for some reason after upgrading for 5.2 those started to be evaluated against their technical characteristics.
The solution was to revert back those rules in the c++ community plugin by patching also the code of the plugin
Upvotes: 0