Quantcast

[Java] Unable to create symbol table for

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Java] Unable to create symbol table for

David RACODON
Hi,

On several files, I'm facing the following error.
I'm running SonarQube 4.5.1, Java plugin 2.6, JDK 7.

[ERROR] [10:34:12.386] Unable to create symbol table for : /var/lib/jenkins-jobs/workspace/.../restapi/customer/json/CompanyName.java
java.lang.NullPointerException: null
	at org.sonar.java.resolve.TypeAndReferenceSolver.getSymbolOfMemberSelectExpression(TypeAndReferenceSolver.java:240) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:208) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMemberSelectExpression(TypeAndReferenceSolver.java:474) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MemberSelectExpressionTreeImpl.accept(MemberSelectExpressionTreeImpl.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitLambdaExpression(BaseTreeVisitor.java:341) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitLambdaExpression(TypeAndReferenceSolver.java:303) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.LambdaExpressionTreeImpl.accept(LambdaExpressionTreeImpl.java:84) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:160) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitVariable(TypeAndReferenceSolver.java:393) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.VariableTreeImpl.accept(VariableTreeImpl.java:181) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitClass(TypeAndReferenceSolver.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.ClassTreeImpl.accept(ClassTreeImpl.java:202) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitCompilationUnit(BaseTreeVisitor.java:56) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:66) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:113) ~[java-squid-2.6.jar:na]
	at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:67) [sslr-core-1.20.jar:na]
	at org.sonar.java.ast.AstScanner.simpleScan(AstScanner.java:108) [java-squid-2.6.jar:na]
	at org.sonar.java.ast.AstScanner.scan(AstScanner.java:76) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:136) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scan(JavaSquid.java:129) [java-squid-2.6.jar:na]
	at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:91) [sonar-java-plugin-2.6.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) [sonar-runner-batch3929575085381785221.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-api-2.4.jar:na]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.Runner.execute(Runner.java:100) [sonar-runner-api-2.4.jar:na]
	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:131) [sonar-maven-plugin-2.4.jar:na]
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:136) [sonar-maven-plugin-2.4.jar:na]
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) [maven-embedder-3.2.1.jar:3.2.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [plexus-classworlds-2.5.1.jar:na]


Thank you

++

--
David RACODON
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

Nicolas Peru
Hi, 

Would you be able to provide the source code on which this failure is happening so I can investigate this more deeply ?
Sounds like a symbol is not resolved properly but I would need to understand which case it is.  

Thanks, 


Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:44, David Racodon <[hidden email]> wrote:
Hi,

On several files, I'm facing the following error.
I'm running SonarQube 4.5.1, Java plugin 2.6, JDK 7.

[ERROR] [10:34:12.386] Unable to create symbol table for : /var/lib/jenkins-jobs/workspace/.../restapi/customer/json/CompanyName.java
java.lang.NullPointerException: null
	at org.sonar.java.resolve.TypeAndReferenceSolver.getSymbolOfMemberSelectExpression(TypeAndReferenceSolver.java:240) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:208) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMemberSelectExpression(TypeAndReferenceSolver.java:474) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MemberSelectExpressionTreeImpl.accept(MemberSelectExpressionTreeImpl.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitLambdaExpression(BaseTreeVisitor.java:341) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitLambdaExpression(TypeAndReferenceSolver.java:303) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.LambdaExpressionTreeImpl.accept(LambdaExpressionTreeImpl.java:84) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:160) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitVariable(TypeAndReferenceSolver.java:393) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.VariableTreeImpl.accept(VariableTreeImpl.java:181) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitClass(TypeAndReferenceSolver.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.ClassTreeImpl.accept(ClassTreeImpl.java:202) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitCompilationUnit(BaseTreeVisitor.java:56) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:66) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:113) ~[java-squid-2.6.jar:na]
	at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:67) [sslr-core-1.20.jar:na]
	at org.sonar.java.ast.AstScanner.simpleScan(AstScanner.java:108) [java-squid-2.6.jar:na]
	at org.sonar.java.ast.AstScanner.scan(AstScanner.java:76) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:136) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scan(JavaSquid.java:129) [java-squid-2.6.jar:na]
	at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:91) [sonar-java-plugin-2.6.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) [sonar-runner-batch3929575085381785221.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-api-2.4.jar:na]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.Runner.execute(Runner.java:100) [sonar-runner-api-2.4.jar:na]
	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:131) [sonar-maven-plugin-2.4.jar:na]
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:136) [sonar-maven-plugin-2.4.jar:na]
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) [maven-embedder-3.2.1.jar:3.2.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [plexus-classworlds-2.5.1.jar:na]


Thank you

++

--
David RACODON

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

Nicolas Peru
Hi David, 
Thanks for the feedback! 

This is indeed a bug on the semantic analysis. This comes from the lambdas you are using in your file: 

You are using a construction of the following kind : var -> var.myMethod()  and in order to resolve the type of myMethod we are looking for the type of var. We are not covering the cases of type inferences and therefore we were not associating any type to the var identifier which results in the null pointer exception. 


Thanks !
Cheers

Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:53, Nicolas Peru <[hidden email]> wrote:
Hi, 

Would you be able to provide the source code on which this failure is happening so I can investigate this more deeply ?
Sounds like a symbol is not resolved properly but I would need to understand which case it is.  

Thanks, 


Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:44, David Racodon <[hidden email]> wrote:
Hi,

On several files, I'm facing the following error.
I'm running SonarQube 4.5.1, Java plugin 2.6, JDK 7.

[ERROR] [10:34:12.386] Unable to create symbol table for : /var/lib/jenkins-jobs/workspace/.../restapi/customer/json/CompanyName.java
java.lang.NullPointerException: null
	at org.sonar.java.resolve.TypeAndReferenceSolver.getSymbolOfMemberSelectExpression(TypeAndReferenceSolver.java:240) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:208) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMemberSelectExpression(TypeAndReferenceSolver.java:474) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MemberSelectExpressionTreeImpl.accept(MemberSelectExpressionTreeImpl.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitLambdaExpression(BaseTreeVisitor.java:341) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitLambdaExpression(TypeAndReferenceSolver.java:303) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.LambdaExpressionTreeImpl.accept(LambdaExpressionTreeImpl.java:84) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:160) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitVariable(TypeAndReferenceSolver.java:393) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.VariableTreeImpl.accept(VariableTreeImpl.java:181) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitClass(TypeAndReferenceSolver.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.ClassTreeImpl.accept(ClassTreeImpl.java:202) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitCompilationUnit(BaseTreeVisitor.java:56) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:66) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:113) ~[java-squid-2.6.jar:na]
	at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:67) [sslr-core-1.20.jar:na]
	at org.sonar.java.ast.AstScanner.simpleScan(AstScanner.java:108) [java-squid-2.6.jar:na]
	at org.sonar.java.ast.AstScanner.scan(AstScanner.java:76) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:136) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scan(JavaSquid.java:129) [java-squid-2.6.jar:na]
	at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:91) [sonar-java-plugin-2.6.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) [sonar-runner-batch3929575085381785221.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-api-2.4.jar:na]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.Runner.execute(Runner.java:100) [sonar-runner-api-2.4.jar:na]
	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:131) [sonar-maven-plugin-2.4.jar:na]
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:136) [sonar-maven-plugin-2.4.jar:na]
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) [maven-embedder-3.2.1.jar:3.2.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [plexus-classworlds-2.5.1.jar:na]


Thank you

++

--
David RACODON


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

David RACODON
Thanks Nicolas!
Feel free to provide a SNAPSHOT when this ticket is fixed so that I can confirm that the issue was the same on all my files.

On Fri, Nov 28, 2014 at 9:05 AM, Nicolas Peru <[hidden email]> wrote:
Hi David, 
Thanks for the feedback! 

This is indeed a bug on the semantic analysis. This comes from the lambdas you are using in your file: 

You are using a construction of the following kind : var -> var.myMethod()  and in order to resolve the type of myMethod we are looking for the type of var. We are not covering the cases of type inferences and therefore we were not associating any type to the var identifier which results in the null pointer exception. 


Thanks !
Cheers

Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:53, Nicolas Peru <[hidden email]> wrote:
Hi, 

Would you be able to provide the source code on which this failure is happening so I can investigate this more deeply ?
Sounds like a symbol is not resolved properly but I would need to understand which case it is.  

Thanks, 


Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:44, David Racodon <[hidden email]> wrote:
Hi,

On several files, I'm facing the following error.
I'm running SonarQube 4.5.1, Java plugin 2.6, JDK 7.

[ERROR] [10:34:12.386] Unable to create symbol table for : /var/lib/jenkins-jobs/workspace/.../restapi/customer/json/CompanyName.java
java.lang.NullPointerException: null
	at org.sonar.java.resolve.TypeAndReferenceSolver.getSymbolOfMemberSelectExpression(TypeAndReferenceSolver.java:240) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:208) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMemberSelectExpression(TypeAndReferenceSolver.java:474) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MemberSelectExpressionTreeImpl.accept(MemberSelectExpressionTreeImpl.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitLambdaExpression(BaseTreeVisitor.java:341) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitLambdaExpression(TypeAndReferenceSolver.java:303) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.LambdaExpressionTreeImpl.accept(LambdaExpressionTreeImpl.java:84) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:160) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitVariable(TypeAndReferenceSolver.java:393) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.VariableTreeImpl.accept(VariableTreeImpl.java:181) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitClass(TypeAndReferenceSolver.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.ClassTreeImpl.accept(ClassTreeImpl.java:202) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitCompilationUnit(BaseTreeVisitor.java:56) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:66) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:113) ~[java-squid-2.6.jar:na]
	at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:67) [sslr-core-1.20.jar:na]
	at org.sonar.java.ast.AstScanner.simpleScan(AstScanner.java:108) [java-squid-2.6.jar:na]
	at org.sonar.java.ast.AstScanner.scan(AstScanner.java:76) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:136) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scan(JavaSquid.java:129) [java-squid-2.6.jar:na]
	at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:91) [sonar-java-plugin-2.6.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) [sonar-runner-batch3929575085381785221.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-api-2.4.jar:na]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.Runner.execute(Runner.java:100) [sonar-runner-api-2.4.jar:na]
	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:131) [sonar-maven-plugin-2.4.jar:na]
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:136) [sonar-maven-plugin-2.4.jar:na]
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) [maven-embedder-3.2.1.jar:3.2.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [plexus-classworlds-2.5.1.jar:na]


Thank you

++

--
David RACODON





--
David RACODON
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

Nicolas Peru
Hi David, 

this should be fixed in this build from cloudbees : https://sonarplugins.ci.cloudbees.com/job/sonar-java/2405/ 

Cheers.

Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 28 November 2014 at 09:42, David Racodon <[hidden email]> wrote:
Thanks Nicolas!
Feel free to provide a SNAPSHOT when this ticket is fixed so that I can confirm that the issue was the same on all my files.

On Fri, Nov 28, 2014 at 9:05 AM, Nicolas Peru <[hidden email]> wrote:
Hi David, 
Thanks for the feedback! 

This is indeed a bug on the semantic analysis. This comes from the lambdas you are using in your file: 

You are using a construction of the following kind : var -> var.myMethod()  and in order to resolve the type of myMethod we are looking for the type of var. We are not covering the cases of type inferences and therefore we were not associating any type to the var identifier which results in the null pointer exception. 


Thanks !
Cheers

Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:53, Nicolas Peru <[hidden email]> wrote:
Hi, 

Would you be able to provide the source code on which this failure is happening so I can investigate this more deeply ?
Sounds like a symbol is not resolved properly but I would need to understand which case it is.  

Thanks, 


Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:44, David Racodon <[hidden email]> wrote:
Hi,

On several files, I'm facing the following error.
I'm running SonarQube 4.5.1, Java plugin 2.6, JDK 7.

[ERROR] [10:34:12.386] Unable to create symbol table for : /var/lib/jenkins-jobs/workspace/.../restapi/customer/json/CompanyName.java
java.lang.NullPointerException: null
	at org.sonar.java.resolve.TypeAndReferenceSolver.getSymbolOfMemberSelectExpression(TypeAndReferenceSolver.java:240) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:208) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMemberSelectExpression(TypeAndReferenceSolver.java:474) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MemberSelectExpressionTreeImpl.accept(MemberSelectExpressionTreeImpl.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitLambdaExpression(BaseTreeVisitor.java:341) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitLambdaExpression(TypeAndReferenceSolver.java:303) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.LambdaExpressionTreeImpl.accept(LambdaExpressionTreeImpl.java:84) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:160) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitVariable(TypeAndReferenceSolver.java:393) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.VariableTreeImpl.accept(VariableTreeImpl.java:181) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitClass(TypeAndReferenceSolver.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.ClassTreeImpl.accept(ClassTreeImpl.java:202) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitCompilationUnit(BaseTreeVisitor.java:56) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:66) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:113) ~[java-squid-2.6.jar:na]
	at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:67) [sslr-core-1.20.jar:na]
	at org.sonar.java.ast.AstScanner.simpleScan(AstScanner.java:108) [java-squid-2.6.jar:na]
	at org.sonar.java.ast.AstScanner.scan(AstScanner.java:76) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:136) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scan(JavaSquid.java:129) [java-squid-2.6.jar:na]
	at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:91) [sonar-java-plugin-2.6.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) [sonar-runner-batch3929575085381785221.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-api-2.4.jar:na]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.Runner.execute(Runner.java:100) [sonar-runner-api-2.4.jar:na]
	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:131) [sonar-maven-plugin-2.4.jar:na]
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:136) [sonar-maven-plugin-2.4.jar:na]
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) [maven-embedder-3.2.1.jar:3.2.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [plexus-classworlds-2.5.1.jar:na]


Thank you

++

--
David RACODON





--
David RACODON

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

David RACODON
I confirm that it fixes all my issues.
Thanks again!

On Fri, Nov 28, 2014 at 11:09 AM, Nicolas Peru <[hidden email]> wrote:
Hi David, 

this should be fixed in this build from cloudbees : https://sonarplugins.ci.cloudbees.com/job/sonar-java/2405/ 

Cheers.

Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 28 November 2014 at 09:42, David Racodon <[hidden email]> wrote:
Thanks Nicolas!
Feel free to provide a SNAPSHOT when this ticket is fixed so that I can confirm that the issue was the same on all my files.

On Fri, Nov 28, 2014 at 9:05 AM, Nicolas Peru <[hidden email]> wrote:
Hi David, 
Thanks for the feedback! 

This is indeed a bug on the semantic analysis. This comes from the lambdas you are using in your file: 

You are using a construction of the following kind : var -> var.myMethod()  and in order to resolve the type of myMethod we are looking for the type of var. We are not covering the cases of type inferences and therefore we were not associating any type to the var identifier which results in the null pointer exception. 


Thanks !
Cheers

Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:53, Nicolas Peru <[hidden email]> wrote:
Hi, 

Would you be able to provide the source code on which this failure is happening so I can investigate this more deeply ?
Sounds like a symbol is not resolved properly but I would need to understand which case it is.  

Thanks, 


Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


On 27 November 2014 at 15:44, David Racodon <[hidden email]> wrote:
Hi,

On several files, I'm facing the following error.
I'm running SonarQube 4.5.1, Java plugin 2.6, JDK 7.

[ERROR] [10:34:12.386] Unable to create symbol table for : /var/lib/jenkins-jobs/workspace/.../restapi/customer/json/CompanyName.java
java.lang.NullPointerException: null
	at org.sonar.java.resolve.TypeAndReferenceSolver.getSymbolOfMemberSelectExpression(TypeAndReferenceSolver.java:240) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:208) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMemberSelectExpression(TypeAndReferenceSolver.java:474) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MemberSelectExpressionTreeImpl.accept(MemberSelectExpressionTreeImpl.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitLambdaExpression(BaseTreeVisitor.java:341) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitLambdaExpression(TypeAndReferenceSolver.java:303) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.LambdaExpressionTreeImpl.accept(LambdaExpressionTreeImpl.java:84) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:160) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:150) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:87) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:218) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:190) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitVariable(TypeAndReferenceSolver.java:393) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.VariableTreeImpl.accept(VariableTreeImpl.java:181) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.TypeAndReferenceSolver.visitClass(TypeAndReferenceSolver.java:110) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.declaration.ClassTreeImpl.accept(ClassTreeImpl.java:202) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37) ~[java-squid-2.6.jar:na]
	at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitCompilationUnit(BaseTreeVisitor.java:56) ~[java-squid-2.6.jar:na]
	at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:66) ~[java-squid-2.6.jar:na]
	at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:113) ~[java-squid-2.6.jar:na]
	at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:67) [sslr-core-1.20.jar:na]
	at org.sonar.java.ast.AstScanner.simpleScan(AstScanner.java:108) [java-squid-2.6.jar:na]
	at org.sonar.java.ast.AstScanner.scan(AstScanner.java:76) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:136) [java-squid-2.6.jar:na]
	at org.sonar.java.JavaSquid.scan(JavaSquid.java:129) [java-squid-2.6.jar:na]
	at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:91) [sonar-java-plugin-2.6.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) [sonar-batch-maven-compat-4.5.1.jar:na]
	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48) [sonar-runner-batch3929575085381785221.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-api-2.4.jar:na]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_72]
	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-api-2.4.jar:na]
	at org.sonar.runner.api.Runner.execute(Runner.java:100) [sonar-runner-api-2.4.jar:na]
	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:131) [sonar-maven-plugin-2.4.jar:na]
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:136) [sonar-maven-plugin-2.4.jar:na]
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) [maven-core-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) [maven-embedder-3.2.1.jar:3.2.1]
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) [maven-embedder-3.2.1.jar:3.2.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_72]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_72]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [plexus-classworlds-2.5.1.jar:na]
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [plexus-classworlds-2.5.1.jar:na]


Thank you

++

--
David RACODON





--
David RACODON




--
David RACODON
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

Thiago Matos
Hi. I'm having the same problem.

I'm running SonarQube 5.1, Java plugin 3.2, JDK 7.67

Here is the log:

[INFO] [14:59:23.095] Sensor JavaSquidSensor
[INFO] [14:59:23.767] Java Main Files AST scan...
[INFO] [14:59:23.767] 679 source files to be analyzed
[ERROR] [14:59:25.877] Unable to create symbol table for : C:\.jenkins\jobs\Project\workspace\Abc\abcdef\src\main\java\com\handmark\pulltorefresh\library\PullToRefreshBase.java
java.lang.NullPointerException: null
        at org.sonar.java.resolve.Resolve.findMemberType(Resolve.java:201) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.Resolve.findType(Resolve.java:222) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.Resolve.findIdent(Resolve.java:282) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:271) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:248) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.SecondPass.resolveType(SecondPass.java:217) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.SecondPass.completeTypeParameters(SecondPass.java:144) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.SecondPass.complete(SecondPass.java:87) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.SecondPass.complete(SecondPass.java:60) ~[java-squid-3.2.jar:na]
        at org.sonar.java.resolve.JavaSymbol.complete(JavaSymbol.java:104) ~[java-squid-3.2.jar:na]

The PullToRefreshBase class belongs to Android-PullToRefresh library, but I want to exclude it from Sonar metrics.
Here is its complete code.
https://github.com/chrisbanes/Android-PullToRefresh/blob/master/library/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java

Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

alex_nabble
similar issue with SonarQube 5.1, JDK 7:

[ERROR] [23:06:56.719] Unable to create symbol table for : /var/lib/jenkins/workspace/.........java
java.lang.IllegalStateException: null
        at com.google.common.base.Preconditions.checkState(Preconditions.java:129) ~[sonar-batch-maven-compat-5.1.jar:na]
        at org.sonar.java.model.AbstractTypedTree.setType(AbstractTypedTree.java:66) ~[java-squid-3.3.jar:na]
        at org.sonar.java.resolve.TypeAndReferenceSolver.registerType(TypeAndReferenceSolver.java:627) ~[java-squid-3.3.jar:na]
        at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:273) ~[java-squid-3.3.jar:na]
        at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:248) ~[java-squid-3.3.jar:na]
        at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:241) ~[java-squid-3.3.jar:na]
        at org.sonar.java.resolve.TypeAndReferenceSolver.visitAnnotation(TypeAndReferenceSolver.java:556) ~[java-squid-3.3.jar:na]
        at org.sonar.java.model.declaration.AnnotationTreeImpl.accept(AnnotationTreeImpl.java:79) ~[java-squid-3.3.jar:na]
        at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:42) ~[java-squid-3.3.jar:na]
        at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:36) ~[java-squid-3.3.jar:na]
        at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitModifier(BaseTreeVisitor.java:328) ~[java-squid-3.3.jar:na]
        at org.sonar.java.model.declaration.ModifiersTreeImpl.accept(ModifiersTreeImpl.java:91) ~[java-squid-3.3.jar:na]
        at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:42) ~[java-squid-3.3.jar:na]
        at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:47) ~[java-squid-3.3.jar:na]
        at org.sonar.java.resolve.TypeAndReferenceSolver.visitVariable(TypeAndReferenceSolver.java:482) ~[java-squid-3.3.jar:na]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

Nicolas Peru
Hi, 

Alex:  your issue seems more related to this one : http://jira.codehaus.org/browse/SONARJAVA-946 

Tiago: I still need to investigate your case.

Cheers,

Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com


2015-05-23 1:28 GMT+02:00 alex_nabble <[hidden email]>:
similar issue with SonarQube 5.1, JDK 7:

[ERROR] [23:06:56.719] Unable to create symbol table for :
/var/lib/jenkins/workspace/.........java
java.lang.IllegalStateException: null
        at com.google.common.base.Preconditions.checkState(Preconditions.java:129)
~[sonar-batch-maven-compat-5.1.jar:na]
        at
org.sonar.java.model.AbstractTypedTree.setType(AbstractTypedTree.java:66)
~[java-squid-3.3.jar:na]
        at
org.sonar.java.resolve.TypeAndReferenceSolver.registerType(TypeAndReferenceSolver.java:627)
~[java-squid-3.3.jar:na]
        at
org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:273)
~[java-squid-3.3.jar:na]
        at
org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:248)
~[java-squid-3.3.jar:na]
        at
org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:241)
~[java-squid-3.3.jar:na]
        at
org.sonar.java.resolve.TypeAndReferenceSolver.visitAnnotation(TypeAndReferenceSolver.java:556)
~[java-squid-3.3.jar:na]
        at
org.sonar.java.model.declaration.AnnotationTreeImpl.accept(AnnotationTreeImpl.java:79)
~[java-squid-3.3.jar:na]
        at
org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:42)
~[java-squid-3.3.jar:na]
        at
org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:36)
~[java-squid-3.3.jar:na]
        at
org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitModifier(BaseTreeVisitor.java:328)
~[java-squid-3.3.jar:na]
        at
org.sonar.java.model.declaration.ModifiersTreeImpl.accept(ModifiersTreeImpl.java:91)
~[java-squid-3.3.jar:na]
        at
org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:42)
~[java-squid-3.3.jar:na]
        at
org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:47)
~[java-squid-3.3.jar:na]
        at
org.sonar.java.resolve.TypeAndReferenceSolver.visitVariable(TypeAndReferenceSolver.java:482)
~[java-squid-3.3.jar:na]






--
View this message in context: http://sonarqube.15.x6.nabble.com/Java-Unable-to-create-symbol-table-for-tp5030508p5035642.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Java] Unable to create symbol table for

alex_nabble
Thank you, Nicolas.
I see the class in question does have some variables declaration on the same line indeed:

                        float sizeWidth, sizeHeight;
                        float llx, lly, urx, ury;  

I am running this code analysis through SonarQube plugin in Jenkins. I assume this issue will be resolved in the next version of that plugin?
Loading...