Quality gate failing on issues that have been baselined


(Mwoodland) #1

Versions used:

  • SonarQube - 6.3.0.19869
  • SonarJava plugin - 4.10.0.10260
  • sonar-maven-plugin - 3.0.2

Error observed:
Occasionally our quality gate will fail on a file that has not been changed since the latest baseline. Investigation of the sonar database showed that that issues were being closed and then reopened again. Further investigation identified that we were getting the following error when running the sonar-maven-plugin on our project. The error occurs for each file that issues are being closed and reopened on. This usually affects only around 1-5 files, and only occurs once a week or less. As far as I’m aware this only affects one of our multiple projects that we use sonarqube for.

[ERROR] Unable to create symbol table for :
java.lang.RuntimeException: java.util.zip.ZipException: invalid distance too far back
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at org.sonar.java.resolve.BytecodeCompleter.loadClass(BytecodeCompleter.java:234)
at org.sonar.java.resolve.Resolve.findIdentInPackage(Resolve.java:338)
at org.sonar.java.resolve.FirstPass$ImportResolverVisitor.visitIdentifier(FirstPass.java:199)
at org.sonar.java.model.expression.IdentifierTreeImpl.accept(IdentifierTreeImpl.java:81)
at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43)
at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitMemberSelectExpression(BaseTreeVisitor.java:229)
at org.sonar.java.model.expression.MemberSelectExpressionTreeImpl.accept(MemberSelectExpressionTreeImpl.java:115)
at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43)
at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitImport(BaseTreeVisitor.java:60)
at org.sonar.java.resolve.FirstPass$ImportResolverVisitor.visitImport(FirstPass.java:161)
at org.sonar.java.model.JavaTree$ImportTreeImpl.accept(JavaTree.java:341)
at org.sonar.java.resolve.FirstPass.resolveImports(FirstPass.java:147)
at org.sonar.java.resolve.FirstPass.visitCompilationUnit(FirstPass.java:124)
at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:61)
at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:101)
at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:87)
at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:63)
at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:119)
at org.sonar.java.JavaSquid.scan(JavaSquid.java:113)
at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:84)
at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:74)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:262)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:255)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:247)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
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.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy26.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:78)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:112)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
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:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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: java.util.zip.ZipException: invalid distance too far back
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at org.objectweb.asm.ClassReader.readClass(ClassReader.java:461)
at org.objectweb.asm.ClassReader.(ClassReader.java:424)
at org.sonar.java.resolve.BytecodeCompleter.loadClass(BytecodeCompleter.java:228)
… 71 common frames omitted

Steps to reproduce:
This cannot be reliably reproduced, but occurs when using the sonar-maven-plugin to scan a Java project.


(G Ann Campbell) #2

Hi,

The current version of SonarQube is 7.3 (7.4 imminent) and the current LTS is 6.7.5. Additionally, the current version of SonarJava is 5.8. So what you’re running is rather old. Please upgrade at your earliest convenience and report back to us if the problem persists.

 
Thx,
Ann