org.sonar.squidbridge.api.AnalysisException

SonarQube is unable to analyze file : 'C:\ws\sonar-cli\Test\src\test\Test.java'

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Stack trace

  • org.sonar.squidbridge.api.AnalysisException: SonarQube is unable to analyze file : 'C:\ws\sonar-cli\Test\src\test\Test.java' at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:93) at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:67) at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:133) at org.sonar.java.JavaSquid.scan(JavaSquid.java:126) at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:93) 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:78) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:184) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) 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:142) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115) at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy0.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:244) at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:154) at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110) at org.sonarsource.scanner.cli.Main.execute(Main.java:72) at org.sonarsource.scanner.cli.Main.main(Main.java:60) Caused by: java.lang.IllegalStateException: At least 4 values were expected on the stack! at org.sonar.java.se.ProgramState.peekValues(ProgramState.java:144) at org.sonar.java.se.checks.UnclosedResourcesCheck$PreStatementVisitor.closeArguments(UnclosedResourcesCheck.java:296) at org.sonar.java.se.checks.UnclosedResourcesCheck$PreStatementVisitor.visitMethodInvocation(UnclosedResourcesCheck.java:269) at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:82) at org.sonar.java.se.checks.UnclosedResourcesCheck.checkPreStatement(UnclosedResourcesCheck.java:78) at org.sonar.java.se.CheckerDispatcher.executeCheckPreStatement(CheckerDispatcher.java:48) at org.sonar.java.se.ExplodedGraphWalker.visit(ExplodedGraphWalker.java:345) at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:188) at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:152) at org.sonar.java.model.declaration.MethodTreeImpl.accept(MethodTreeImpl.java:218) at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:49) at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:95) at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120) at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97) at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120) at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97) at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:78) at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java:64) at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:120) at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:84) ... 34 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

We couldn't find other users who have seen this exception.