Reputation: 21
I'm using Sonarqube 6.2 with sonar java plugin of version 4.4.0.8066 and getting this error on a project compiled with JDK 1.8 :
[DEBUG] 22:09:01.566 Could not complete symbolic execution:
22:09:01 org.sonar.java.se.ExplodedGraphWalker$MaximumStepsReachedException: reached limit of 16000 steps for method setData#198 in class PaymentVarianceReportFilterCriteria
22:09:01 at org.sonar.java.se.ExplodedGraphWalker.throwMaxSteps(ExplodedGraphWalker.java:260)
22:09:01 at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:211)
22:09:01 at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:186)
22:09:01 at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:68)
22:09:01 at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:57)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:95)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:78)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java
.................
........................
....................
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project ct: Error 500 on http://stssonar01/api/ce/submit?projectKey=com.edifecs:ct&projectName=Edifecs%20Collaborative%20Testing%20Build : {"errors":[{"msg":"An error has occurred. Please contact your administrator."}]} -> [Help 1]
22:50:07 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project ct: Error 500 on http://stssonar01/api/ce/submit?projectKey=com.edifecs:ct&projectName=Edifecs%20Collaborative%20Testing%20Build : {"errors":[{"msg":"An error has occurred. Please contact your administrator."}]}
22:50:07 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
22:50:07 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
Am I missing something here while running the sonar:sonar step of maven build process clean install sonar:sonar
?
Please help me to get out of this. Thanks in advance..
Upvotes: 2
Views: 4833
Reputation: 848
This is related to the negative testing introduced with the symbolic execution.
For two rules (S2259 about nullpointer exceptions and S2583 about conditions always true or false) this test is executed.
Essentially, in the method there is a point where the total number of all possibilities for nulls/always true or false iterates past 6000.
You can disable the two rules, or refactor the method to not have so many if/case logic in it.
This was supposed to be non-invasive with regards to (https://jira.sonarsource.com/browse/SONARJAVA-1406) and only render in debug mode, however I can confirm it still halts the read with maven plugin.
Upvotes: 1