I am facing an issue when I am trying analyzing iPhone app code with the help of sonarqube.
I am getting below error when trying to execute sonar-runner from app root directory.
11:06:17.040 INFO - Index files<br/>
11:06:18.276 INFO - 214 files indexed<br/>
11:06:18.966 INFO - Quality profile for objc: OCLint<br/>
11:06:19.016 INFO - Sensor QProfileSensor...<br/>
11:06:19.020 INFO - Sensor QProfileSensor done: 4 ms<br/>
11:06:19.020 INFO - Sensor ObjectiveCSquidSensor...<br/>
11:06:19.334 INFO - Sensor ObjectiveCSquidSensor done: 314 ms<br/>
11:06:19.334 INFO - Sensor Objective-C SurefireSensor...<br/>
11:06:19.334 INFO - parsing sonar-reports<br/>
11:06:19.334 INFO - Sensor Objective-C SurefireSensor done: 0 ms<br/>
11:06:19.335 INFO - Sensor org.sonar.plugins.objectivec.coverage.CoberturaSensor#6544899b...<br/>
11:06:19.342 INFO - Sensor
org.sonar.plugins.objectivec.coverage.CoberturaSensor#6544899b done: 7 ms<br/>
11:06:19.342 INFO - Sensor org.sonar.plugins.objectivec.violations.OCLintSensor#6da54910...<br/>
11:06:19.342 INFO - Processing OCLint report /Users/org/Documents/C/ISH/projects/Proj1/mobile2.2.0.5/mobile/ios/Proj1-Mobile/./sonar-reports/oclint.xml<br/>
11:06:19.346 ERROR - Error processing file named /Users/org/Documents/C/ISH/projects/Proj1/mobile2.2.0.5/mobile/ios/Proj1-Mobile/./sonar-reports/oclint.xml<br/>
java.io.FileNotFoundException: /Users/org/Documents/C/ISH/projects/Proj1/mobile2.2.0.5/mobile/ios/Proj1-Mobile/./sonar-reports/oclint.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_60]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[na:1.8.0_60]
at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[na:1.8.0_60]
at org.sonar.plugins.objectivec.violations.OCLintParser.parseReport(OCLintParser.java:49) ~[sonar-objective-c-plugin-0.4.0.jar:na]
Thanks in advance ,Let me know if someone faced same problem before.
If my understanding is correct, you're using the community SonarQube Objective-C plugin (https://github.com/octo-technology/sonar-objective-c), the best best to get some help is to create an issue here : https://github.com/octo-technology/sonar-objective-c/issues
I met same issue before, I solved it by using
sudo ./run-sonar.sh
The reason could be the oclint.xml is generated by root user before, and you are running as non-root user, so no privilege for you to access oclint.xml
Another possible reason is the dot(.) prefix in sonar-project.properties, Proj1-Mobile/./sonar-reports/oclint.xml, try to remove the ./ prefix in your properties file for the oclint.xml
Related
I have a StackOverflowError when building the project in Intellij IDEA 2017.2. It started ocurring after I dropped all IDEA settings and started onboarding my project again.
The build log has the following:
2017-12-13 14:59:55,043 [ 16299] INFO - .incremental.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:false
2017-12-13 14:59:55,043 [ 16299] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin incremental compilation enabled: true
2017-12-13 14:59:55,043 [ 16299] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin experimental incremental compilation enabled: true
2017-12-13 14:59:55,060 [ 16316] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin compiler daemon enabled: true
2017-12-13 14:59:55,060 [ 16316] INFO - kotlin.jps.build.KotlinBuilder - Label in local history: build started 2019016a
2017-12-13 14:59:55,066 [ 16322] INFO - CompilerBackwardReferenceIndex - backward reference index version differ due to: class java.io.FileNotFoundException
2017-12-13 14:59:55,080 [ 16336] INFO - .incremental.IncProjectBuilder - Cleaned output directories in 14 ms
2017-12-13 14:59:55,346 [ 16602] INFO - .incremental.IncProjectBuilder - maven-resources-test:project-common: java.lang.StackOverflowError
org.jetbrains.jps.incremental.ProjectBuildException: maven-resources-test:project-common: java.lang.StackOverflowError
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1035)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:900)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:733)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:385)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:192)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:295)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.StackOverflowError
at com.intellij.util.io.PagedFileStorage.getByteBuffer(PagedFileStorage.java:193)
at com.intellij.util.io.IntToIntBtree$BtreePage.syncWithStore(IntToIntBtree.java:332)
at com.intellij.util.io.IntToIntBtree$BtreePage.setAddress(IntToIntBtree.java:321)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1178)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1179)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1179)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1179)
And many many more same invocations of this method. At the end of stacktrace:
2017-12-13 14:59:56,059 [ 0] INFO - etbrains.jps.cmdline.BuildMain - Build process started. Classpath: C:/path/to/idea/lib/jps-launcher.jar;C:/path/to/jdk/lib/tools.jar;C:/path/to/idea/lib/optimizedFileManager.jar
2017-12-13 14:59:56,150 [ 91] INFO - til.internal.PlatformDependent - Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2017-12-13 14:59:56,528 [ 469] INFO - etbrains.jps.cmdline.BuildMain - Connection to IDE established in 439 ms
2017-12-13 14:59:56,544 [ 485] INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational
2017-12-13 14:59:56,545 [ 486] INFO - jps.cmdline.JpsModelLoaderImpl - Loading model: project path = /path/to/project, global options path = path/to/options
2017-12-13 14:59:57,128 [ 1069] INFO - jps.cmdline.JpsModelLoaderImpl - Model loaded in 583 ms
2017-12-13 14:59:57,128 [ 1069] INFO - jps.cmdline.JpsModelLoaderImpl - Project has 11 modules, 179 libraries
2017-12-13 14:59:57,316 [ 1257] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=3536
2017-12-13 14:59:57,512 [ 1453] INFO - etbrains.jps.cmdline.BuildMain - Pre-loaded process ready in 1453 ms
I have found a similar question - IntelliJ IDEA: StackOverflowError on Build Project , but the solution there - setting -Xss4m did not help me.
I think this error might be in some way connected with my settings.xml Maven file because I modified it after clearing IDEA's settings. However, I cannot understand why it leads to this error.
I would very much appreciate any help on the subject.
The solution (a pretty straightforward one) was to completely reinstall IDEA with dropping all the configurations and plugins. Reinstalling IDEA while keeping configuration hadn't worked before, so most likely I had some misconfiguration in its settings files.
I ran into this problem after loading and unloading modules repeatedly. Changing the stack size didn't help, and the build worked from the command line with Maven.
I did File->Invalidate Caches / Restart... and that fixed it.
Using SonarQube 5.2 with Sonar-Java-Plugin 3.8, and for analysis Sonar-Runner 2.4 is used.
Plugin and java-custom examples are downloaded from git (https://github.com/SonarSource/sonar-examples/tree/master/plugins/java-custom-rules), built and deployed on server, and rules are visible on the server. Rules were activated using web under "Sonar Way" profile (which is default). A new test profile is also created and rule "Avoid Brand in method name" is added to it, and associated a project to it.
While analyzing sample java code from (/src/test/files), issues from all default java rules are locked on server, but no issue for the custom rules are locked. There are no explicit error in logs either.
sonar-runner.properties
sonar.host.url=http://localhost:9000
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar52?useUnicode=true&characterEncoding=utf8
sonar.jdbc.username=root
sonar.jdbc.password=ChangeIt
sonar.projectKey=TestSonarCustomRules
sonar.projectName=TestSonarCustomRules
sonar.projectVersion=1.0
sonar.sources=E:/Sonar Example/sonar-examples-master/plugins/java-custom-rules/src/test/files/
Here are the analysis logs:
E:\sonar-runner-2.4
SonarQube Runner 2.4
Java 1.8.0_45 Oracle Corporation (64-bit)
Windows 7 6.1 amd64
INFO: Runner configuration file: E:\sonar-runner-2.4\conf\sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Work directory: E:\Sonar Example\sonar-examples-master\plugins\java-custom-rules\src\test\files\.\.sonar
INFO: SonarQube Server 5.2
18:56:49.391 INFO - Load global repositories
18:56:49.539 INFO - Load global repositories (done) | time=145ms
18:56:49.557 WARN - Property 'sonar.jdbc.url' is not supported any more. There is no more DB connection to the SQ database. It will be ignored.
18:56:49.558 WARN - Property 'sonar.jdbc.username' is not supported any more. There is no more DB connection to the SQ database. It will be ignored.
18:56:49.558 WARN - Property 'sonar.jdbc.password' is not supported any more. There is no more DB connection to the SQ database. It will be ignored.
18:56:49.560 INFO - User cache: C:\Users\kapil.saxena\.sonar\cache
18:56:49.777 INFO - Load plugins index
18:56:49.781 INFO - Load plugins index (done) | time=4ms
18:56:49.960 INFO - Process project properties
18:56:50.209 INFO - Load project repositories
18:56:50.290 INFO - Load project repositories (done) | time=81ms
18:56:50.298 INFO - Apply project exclusions
18:56:50.369 INFO - Load quality profiles
18:56:50.401 INFO - Load quality profiles (done) | time=32ms
18:56:50.403 INFO - Load active rules
18:56:50.478 INFO - Load active rules (done) | time=75ms
18:56:50.498 WARN - SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
18:56:50.499 INFO - Publish mode
18:56:50.500 INFO - ------------- Scan TestSonarCustomRules
18:56:50.582 INFO - Load server rules
18:56:50.630 INFO - Load server rules (done) | time=48ms
18:56:50.683 INFO - Base dir: E:\Sonar Example\sonar-examples-master\plugins\java-custom-rules\src\test\files
18:56:50.683 INFO - Working dir: E:\Sonar Example\sonar-examples-master\plugins\java-custom-rules\src\test\files\.sonar
18:56:50.685 INFO - Source paths: .
18:56:50.685 INFO - Source encoding: windows-1252, default locale: en_US
18:56:50.686 INFO - Index files
18:56:50.758 INFO - 7 files indexed
18:56:50.760 INFO - Quality profile for java: Kapil Test Profile
18:56:50.786 INFO - Sensor JavaSquidSensor
18:56:50.925 INFO - Configured Java source version: none
18:56:50.954 INFO - JavaClasspath initialization...
18:56:50.954 INFO - JavaClasspath initialization done: 0 ms
18:56:50.954 INFO - JavaTestClasspath initialization...
18:56:50.954 INFO - JavaTestClasspath initialization done: 0 ms
18:56:51.232 INFO - Java Main Files AST scan...
18:56:51.234 INFO - 7 source files to be analyzed
18:56:51.631 INFO - 7/7 source files have been analyzed
18:56:51.632 INFO - Java Main Files AST scan done: 400 ms
18:56:51.632 WARN - Java bytecode has not been made available to the analyzer. The org.sonar.java.bytecode.visitor.DependenciesVisitor#3a5c2626 are disabled.
18:56:51.632 INFO - Java Test Files AST scan...
18:56:51.632 INFO - 0 source files to be analyzed
18:56:51.632 INFO - Java Test Files AST scan done: 0 ms
18:56:51.632 INFO - 0/0 source files have been analyzed
18:56:51.632 INFO - Sensor JavaSquidSensor (done) | time=846ms
18:56:51.633 INFO - Sensor Lines Sensor
18:56:51.635 INFO - Sensor Lines Sensor (done) | time=2ms
18:56:51.635 INFO - Sensor QProfileSensor
18:56:51.640 INFO - Sensor QProfileSensor (done) | time=5ms
18:56:51.640 INFO - Sensor SurefireSensor
18:56:51.641 INFO - parsing E:\Sonar Example\sonar-examples-master\plugins\java-custom-rules\src\test\files\target\surefire-reports
18:56:51.641 ERROR - Reports path not found or is not a directory: E:\Sonar Example\sonar-examples-master\plugins\java-custom-rules\src\test\files\target\surefire-reports
18:56:51.641 INFO - Sensor SurefireSensor (done) | time=1ms
18:56:51.641 INFO - Sensor SCM Sensor
18:56:51.641 INFO - No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
18:56:51.641 INFO - Sensor SCM Sensor (done) | time=0ms
18:56:51.641 INFO - Sensor Code Colorizer Sensor
18:56:51.642 INFO - Sensor Code Colorizer Sensor (done) | time=1ms
18:56:51.642 INFO - Sensor CPD Sensor
18:56:51.642 INFO - JavaCpdEngine is used for java
18:56:51.682 INFO - Sensor CPD Sensor (done) | time=40ms
18:56:51.752 INFO - Analysis reports generated in 68ms, dir size=9 KB
18:56:51.873 INFO - Analysis reports compressed in 121ms, zip size=11 KB
18:56:51.912 INFO - Analysis reports sent to server in 38ms
18:56:51.913 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/TestSonarCustomRules
18:56:51.913 INFO - Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report.
18:56:51.913 INFO - More about the report processing at http://localhost:9000/api/ce/task?id=AVGl0nT8XJ_fdu5L48WL
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS INFO:
------------------------------------------------------------------------
Total time: 3.290s Final Memory: 14M/325M INFO:
------------------------------------------------------------------------
sonar, access and wrapper logs are all clean.
Here's image from SonarQube web showing issues for AvoidBrandInMethodNamesChecks, where all default issues are locked but issues against custom rule are not locked:
Issues for AvoidBrandInMethodNamesCheck
Any help would be appreciated.
Debug statements from custom plugin code were not executed when analysis was done with logging level at verbose/DEBUG.
The behaviour was the same when analysis was done using SonarQube 5.1 / 5.2 / 5.3 against databases default embedded H2 / PostgreSQL 9.5
Finally worked. I was using wrong version of examples. My pom.xml file of java-custom-rules did not have the following:
<dependency>
<groupId>org.sonarsource.java</groupId>
<artifactId>java-squid</artifactId>
<version>${java.plugin.version}</version>
</dependency>
Note: Get the latest version of examples.
I have SonarQube 5.1 installed with sonar-runner 2.4, using Oracle database. When running sonar-runner on my project the analysis goes well and all steps until publishing the report is without problem, but then the logger gives me this:
08:04:45.705 INFO - Sensor JavaSquidSensor (done) | time=147026ms
08:04:45.705 INFO - Sensor Lines Sensor
08:04:46.007 INFO - Sensor Lines Sensor (done) | time=302ms
08:04:46.008 INFO - Sensor QProfileSensor
08:04:46.016 INFO - Sensor QProfileSensor (done) | time=8ms
08:04:46.017 INFO - Sensor InitialOpenIssuesSensor
08:04:46.363 INFO - Sensor InitialOpenIssuesSensor (done) | time=346ms
08:04:46.364 INFO - Sensor ProjectLinksSensor
08:04:46.474 INFO - Sensor ProjectLinksSensor (done) | time=110ms
08:04:46.475 INFO - Sensor VersionEventsSensor
08:04:46.908 INFO - Sensor VersionEventsSensor (done) | time=433ms
08:04:46.909 INFO - Sensor SurefireSensor
08:04:46.911 INFO - parsing /app/aim/jenkinsNew/jobs/Unit Testing with Code Coverage (DEV)/workspace/download/Omegapoint/.sonar/build/surefire-reports
08:04:46.911 WARN - Reports path not found: /app/aim/jenkinsNew/jobs/Unit Testing with Code Coverage (DEV)/workspace/download/Omegapoint/.sonar/build/surefire-reports
08:04:46.912 INFO - Sensor SurefireSensor (done) | time=3ms
08:04:46.912 INFO - Sensor SCM Sensor
08:04:46.912 INFO - No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
08:04:46.912 INFO - Sensor SCM Sensor (done) | time=0ms
08:04:46.912 INFO - Sensor CPD Sensor
08:04:46.912 INFO - JavaCpdEngine is used for java
08:04:46.915 INFO - Cross-project analysis disabled
08:04:53.913 INFO - Sensor CPD Sensor (done) | time=7001ms
08:04:53.917 INFO - No quality gate is configured.
08:04:55.523 INFO - Execute decorators...
08:05:13.250 INFO - Store results in database
08:05:39.050 INFO - Analysis reports generated in 2135ms, dir size=1 MB
08:05:42.067 INFO - Analysis reports compressed in 3016ms, zip size=927 KB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 4:09.242s
Final Memory: 26M/230M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Fail to execute request [code=500, url=http://XXX.XXX.XXX.XXX:9010/api/computation/submit_report?projectKey=SonarCube-report]: {"errors":[{"msg":"Fail to store analysis report of project SonarCube-report"}]}
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
The server SonarQube log sonar.log gives a long output (truncated here):
2015.06.05 08:58:41 ERROR web[o.s.s.w.WebServiceEngine] Fail to process request http://XXX.XXX.XXX.XXX:9010/api/computation/submit_report?projectKey=SonarCube-report
java.lang.IllegalStateException: Fail to store analysis report of project SonarCube-report
at org.sonar.server.computation.ReportQueue.add(ReportQueue.java:67) ~[sonar-server-5.1.jar:na]
at org.sonar.server.computation.ws.SubmitReportWsAction.handle(SubmitReportWsAction.java:75) ~[sonar-server-5.1.jar:na]
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:84) ~[sonar-server-5.1.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95) ~[na:1.7.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56) ~[na:1.7.0]
at java.lang.reflect.Method.invoke(Method.java:620) ~[na:2.6 (12-15-2014)]
and
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157) [na:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627) [na:1.7.0]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.18.jar:8.0.18]
at java.lang.Thread.run(Thread.java:863) [na:1.7.0]
Caused by: java.io.IOException: not opened for reading
at org.jruby.util.io.ChannelStream.checkReadable(ChannelStream.java:134) ~[jruby-complete-1.7.9.jar:na]
at org.jruby.util.io.ChannelStream.bufferedRead(ChannelStream.java:994) ~[jruby-complete-1.7.9.jar:na]
at org.jruby.util.io.ChannelStream.access$300(ChannelStream.java:62) ~[jruby-complete-1.7.9.jar:na]
at org.jruby.util.io.ChannelStream$InputStreamAdapter.read(ChannelStream.java:1570) ~[jruby-complete-1.7.9.jar:na]
at java.io.InputStream.read(InputStream.java:114) ~[na:1.7.0]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792) ~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769) ~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744) ~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.copyInputStreamToFile(FileUtils.java:1512) ~[commons-io-2.4.jar:2.4]
at org.sonar.server.computation.ReportQueue.saveReportOnDisk(ReportQueue.java:88) ~[sonar-server-5.1.jar:na]
at org.sonar.server.computation.ReportQueue.add(ReportQueue.java:61) ~[sonar-server-5.1.jar:na]
... 357 common frames omitted
I have double-checked that the database contains all sonar tables and data, and that it is reachable. Since I get this far in the process I suppose that connecting to the database is not problem? Any suggestions what to do?
Since I can't comment (need more "reputation" on stackoverflow) here's what I'm thinking:
First, I believe you're right that it isn't a database issue. This seems to be an issue with the server gathering the stored data.
So to resolve this, please check these things:
Check that your server's port 9010 is open/free while your sonar analysis is running.
Check your sonar.properties file for how you've configured the web server.
Check your wrapper.conf file
Check your access.log
Let me know what you find.
I had a similar issue on SonarQube server. Root cause was iNode count. SonarQube dir had couple of million files under its tmp directory. I deleted all the files under this tmp to free up inodes & did a restart. inode count (df -ih) then looked normal and SQ started working just fine.
I am trying to analyse Java project using SOnar 3.7 & sonar-runner 2.3.
I was successfully able to analyse same codebase using Sonar 3.6.1 & Sonar runner 2.2.1 with same rule set/profile.
However, when I have upgraded version then I am having following errors...
org.jdom.IllegalDataException: The data "null" is not legal for a JDO
M attribute: A null is not a legal XML value
Console Output :
SonarQube Runner 2.3 Java 1.6.0_30 Sun Microsystems Inc. (64-bit) Windows 7 6.1 amd64
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: C:\Dhruba\InstallationFolder\Sonar\sonar-runner-2.3\conf\sonar-runner.properties
INFO: Project configuration file: C:\Dhruba\Projects\Elsevier-OPSBANK_II_AIS\R11_Service_Workspace\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Work directory: C:\Dhruba\Projects\Elsevier-OPSBANK_II_AIS\R11_Service_Workspace\.sonar
INFO: SonarQube Server 3.7
13:38:29.376 INFO - Load batch settings
13:38:29.482 INFO - User cache: C:\Users\Dhruba\.sonar\cache
13:38:29.487 INFO - Install plugins
13:38:31.219 INFO - Install JDBC driver
13:38:31.227 INFO - Create JDBC datasource for jdbc:oracle:thin:#localhost:1521 /orcl
13:38:32.382 INFO - Initializing Hibernate 13:38:34.579 INFO - Load project settings
13:38:34.665 INFO - Apply project exclusions
13:38:34.788 INFO - ------------- Scan OPSBankIIUtilityService
13:38:34.790 INFO - Load module settings
13:38:35.382 INFO - Quality profile : [name=OBBase1,language=java]
13:38:35.394 INFO - Excluded sources:
13:38:35.394 INFO - **/*_*.java
13:38:35.394 INFO - **/bo/**
13:38:35.395 INFO - */stub/**
13:38:35.395 INFO - **/*FacadeSoap*.java
13:38:35.395 INFO - com.ibm.ejs.container._EJSWrapper_**/src
13:38:35.395 INFO - *_Deser/src
13:38:35.395 INFO - *Proxy.java
13:38:35.395 INFO - */*FacadeHome.java
13:38:35.395 INFO - */*FacadeLocalHome.java 13:38:35.395 INFO - com/elsevier/obii/xml/*
13:38:35.395 INFO - Excluded tests:
13:38:35.395 INFO - */package-info.java
13:38:35.430 INFO - Configure Maven plugins
13:38:35.502 INFO - Compare to previous analysis
13:38:35.532 INFO - Compare over 7 days (2013-09-14)
13:38:35.558 INFO - Compare to previous version
13:38:35.734 INFO - Base dir: C:\Dhruba\Projects\Elsevier-OPSBANK_II_AIS\R11_Service_Workspace\OPSBankIIUtilityService
13:38:35.734 INFO - Working dir: C:\Dhruba\Projects\Elsevier-OPSBANK_II_AIS\R11_Service_Workspace\.sonar\dhrsrvc_OPSBankIIUtilityService
13:38:35.735 INFO - Source dirs: C:\Dhruba\Projects\Elsevier-OPSBANK_II_AIS\R11_Service_Workspace\OPSBankIIUtilityService\src
13:38:35.735 INFO - Source encoding: windows-1252, default locale: en_US
13:38:36.090 INFO - Sensor JavaSourceImporter...
13:38:37.021 INFO - Sensor JavaSourceImporter done: 931 ms
13:38:37.021 INFO - Sensor JavaSquidSensor...
13:38:37.160 INFO - Java AST scan...
13:38:40.518 INFO - Java AST scan done: 3358 ms
13:38:40.763 INFO - Sensor JavaSquidSensor done: 3742 ms
13:38:40.764 INFO - Sensor SurefireSensor...
13:38:40.765 INFO - parsing C:\Dhruba\Projects\Elsevier-OPSBANK_II_AIS\R11_Service_Workspace\.sonar\dhrsrvc_OPSBankIIUtilityService\build\surefire-reports
13:38:40.767 INFO - Sensor SurefireSensor done: 3 ms
13:38:40.769 INFO - Sensor CpdSensor...
13:38:40.770 INFO - SonarEngine is used
13:38:40.846 INFO - Cross-project analysis disabled
13:38:41.511 INFO - Sensor CpdSensor done: 742 ms
13:38:41.511 INFO - Sensor CheckstyleSensor...
13:38:41.514 INFO - Execute Checkstyle 5.6...
13:38:41.534 INFO - Checkstyle configuration: C:\Dhruba\Projects\Elsevier-OPSBANK_II_AIS\R11_Service_Workspace\.sonar\dhrsrvc_OPSBankIIUtilityService\checkstyle.xml
13:38:43.845 INFO - Execute Checkstyle 5.6 done: 2331 ms
13:38:43.849 INFO - Sensor CheckstyleSensor done: 2338 ms
13:38:43.850 INFO - Sensor PmdSensor...
13:38:43.853 INFO - Execute PMD 4.3...
13:38:43.864 INFO - Java version: 1.5
13:38:44.008 INFO - Execute PMD 4.3 done: 155 ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 17.761s Final Memory: 15M/406M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41) Caused by: org.sonar.api.utils.XmlParserException: org.jdom.IllegalDataException : The data "null" is not legal for a JDOM attribute: A null is not a legal XML value.
at org.sonar.plugins.pmd.PmdSensor.analyse(PmdSensor.java:55)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:72)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:114)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:142)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:186)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:181)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:179)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:174)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:156)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:144)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
**Caused by: org.jdom.IllegalDataException: The data "null" is not legal for a JDO M attribute: A null is not a legal XML value.**
at org.jdom.Attribute.setValue(Attribute.java:486)
at org.jdom.Attribute.<init>(Attribute.java:229)
at org.jdom.Attribute.<init>(Attribute.java:252)
at org.jdom.Element.setAttribute(Element.java:1109)
at org.sonar.plugins.pmd.PmdProfileExporter.exportPmdRulesetToXml(PmdProfileExporter.java:126)
at org.sonar.plugins.pmd.PmdProfileExporter.exportProfile(PmdProfileExporter.java:63)
at org.sonar.plugins.pmd.PmdExecutor.createRulesets(PmdExecutor.java:107)
at org.sonar.plugins.pmd.PmdExecutor.executeRules(PmdExecutor.java:89)
at org.sonar.plugins.pmd.PmdExecutor.executePmd(PmdExecutor.java:75)
at org.sonar.plugins.pmd.PmdExecutor.execute(PmdExecutor.java:61)
at org.sonar.plugins.pmd.PmdSensor.analyse(PmdSensor.java:52)
... 37 more ERROR: ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Can you please help to resolve this one ?
I was analyzing the issue and found that imported profile from Sonar 3.6.1 to 3.7 had issue. Sonar 3.7 was not able to parse few of the XPath rules.
Therefore, I have just removed those XPath rules and re-added them manually and it starts working. This issue is not a bug of Sonar-runner instead Sonar 3.7 could not restore profiles correctly.
I have setup a Sonar server and am trying to pull some metrics by setting up a test project, but I encounter some problems.
Environment:
OS: Windows Server 2008 R2 / amd64 / 6.1
App Server:Tomcat/7.0.40I, deployed the Sonar WAR file (3.5.1).
DB: MySQL v5.6.11
(relevant) Plugins:
Sonar C++ Community Plugin (0.2)
The plugin is visible under General Settings --> Sonar C++ Community Plugin
sonar-project.properties:
# Required metadata
sonar.projectKey=mistral:pmc
sonar.projectName=PMC
sonar.projectVersion=1.0
sonar.language=c++
# Comma-separated paths to directories with sources (required)
sonar.sources=e:/Development/mistral/PMC/trunk/
# Optional path to the CppCheck program required to activate some CppCheck rules
sonar.cpp.cppcheck.path=C:/Program Files (x86)/Cppcheck/cppcheck.exe
# Encoding of the source files
sonar.sourceEncoding=UTF-8
Issue 1:
When running the sonar-runner it fails as it tries to analyse irrelevant filetypes, like .DOC (see below)
C:\Users\Administrator\Documents\sonar-runner-2.2.1
Sonar Runner 2.2.1
Java 1.7.0_21 Oracle Corporation (64-bit)
Windows Server 2008 R2 6.1 amd64
INFO: Runner configuration file: C:\Users\Administrator\Documents\sonar-runner-2.2.1\conf\sonar-runner.properties
INFO: Project configuration file: C:\Users\Administrator\Documents\sonar-projects\PMC\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
INFO: Sonar Server 3.5.1
13:18:23.320 INFO - Load batch settings
13:18:23.429 INFO - User cache: C:\Users\Administrator\.sonar\cache
13:18:23.444 INFO - Install plugins
13:18:24.287 INFO - ------------- Executing Project Scan
13:18:24.848 INFO - Install JDBC driver
13:18:24.848 INFO - Apply project exclusions
13:18:24.864 INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
13:18:25.129 INFO - Initializing Hibernate
13:18:27.563 INFO - ------------- Inspecting PMC
13:18:27.578 INFO - Load module settings
13:18:28.780 INFO - Quality profile : [name=Default C++ Profile,language=c++]
13:18:28.795 INFO - Excluded tests:
13:18:28.795 INFO - **/package-info.java
13:18:28.826 INFO - Configure Maven plugins
13:18:28.982 INFO - Compare to previous analysis (2013-05-30)
13:18:29.045 INFO - Compare over 5 days (2013-05-25, analysis of 2013-05-29 09:23:04.0)
13:18:29.092 INFO - Compare over 30 days (2013-04-30, analysis of 2013-05-29 09:23:04.0)
13:18:29.294 INFO - Base dir: C:\Users\Administrator\Documents\sonar-projects\PMC
13:18:29.294 INFO - Working dir: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
13:18:29.294 INFO - Source dirs: e:\Development\mistral\PMC\trunk
13:18:29.294 INFO - Source encoding: UTF-8, default locale: en_US
13:18:29.560 INFO - Sensor CxxSourceImporter...
13:18:30.932 WARN - SQL Error: 1366, SQLState: HY000
13:18:30.932 ERROR - Incorrect string value: '\xF2\x97\xA4\xB9\xDC\xAE...' for column 'data' at row 1
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 8.408s
Final Memory: 12M/352M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Unable to read and import the source file : 'e:\Development\mistral\PMC\trunk\doc\guides\Mistral_PMC_BroadcastEnvironmentImporter_user_guide.doc' with the charset : 'UTF-8'.
ERROR: Caused by: Unable to persist : SnapshotSource[snapshot_id=1742,data=??◄?→? > ♥ ?? ♠ ♀ ?♣ ► ?♣ ☺ ???? ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? g? ♦ ?↕?
??☼ ??☼ ??☼ ? ?§ ?§ ?" ?" 0# 0# 0# $ ???? T# T# T# P ?# ? ($ ? T# ?? ?☺ ?$ ?☻ ?' ( ?'
?' ?' ?+ j♦ ►0 l☺ |1 ? (? ☻ *? *? *? *? *? *? $ ?? ?☻ =? ?☺ N? § 0# 42 H+ H+ ^ ...]
ERROR: Caused by: org.hibernate.exception.GenericJDBCException: could not insert: [org.sonar.api.database.model.SnapshotSource]
ERROR: Caused by: could not insert: [org.sonar.api.database.model.SnapshotSource]
ERROR: Caused by: Incorrect string value: '\xF2\x97\xA4\xB9\xDC\xAE...' for column 'data' at row 1
ERROR:
ERROR: To see the full stack trace of the errors, re-run Sonar Runner with the -e switch.
ERROR: Re-run Sonar Runner using the -X switch to enable full debug logging.
When I forcefully exclude the offending file types by adding: sonar.exclusions=**/*.doc,**/*.svc to the sonar-project.properties file I can work around this problem, but I rather get it to work as expected (only take files into account as configured)
Issue 2:
The analysis throws allot of “Lexical error in file” errors while scanning (see below). I believe this might happen if the source encoding differs.
C:\Users\Administrator\Documents\sonar-projects\PMC>sonar-runner
C:\Users\Administrator\Documents\sonar-runner-2.2.1
Sonar Runner 2.2.1
Java 1.7.0_21 Oracle Corporation (64-bit)
Windows Server 2008 R2 6.1 amd64
INFO: Runner configuration file: C:\Users\Administrator\Documents\sonar-runner-2.2.1\conf\sonar-runner.properties
INFO: Project configuration file: C:\Users\Administrator\Documents\sonar-projects\PMC\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
INFO: Sonar Server 3.5.1
13:22:35.048 INFO - Load batch settings
13:22:35.154 INFO - User cache: C:\Users\Administrator\.sonar\cache
13:22:35.157 INFO - Install plugins
13:22:35.878 INFO - ------------- Executing Project Scan
13:22:36.471 INFO - Install JDBC driver
13:22:36.476 INFO - Apply project exclusions
13:22:36.481 INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
13:22:36.730 INFO - Initializing Hibernate
13:22:38.990 INFO - ------------- Inspecting PMC
13:22:38.995 INFO - Load module settings
13:22:40.078 INFO - Quality profile : [name=Default C++ Profile,language=c++]
13:22:40.096 INFO - Excluded sources:
13:22:40.097 INFO - **/*.doc
13:22:40.097 INFO - **/*.svc
13:22:40.097 INFO - Excluded tests:
13:22:40.098 INFO - **/package-info.java
13:22:40.125 INFO - Configure Maven plugins
13:22:40.266 INFO - Compare to previous analysis (2013-05-30)
13:22:40.326 INFO - Compare over 5 days (2013-05-25, analysis of 2013-05-29 09:23:04.0)
13:22:40.366 INFO - Compare over 30 days (2013-04-30, analysis of 2013-05-29 09:23:04.0)
13:22:40.575 INFO - Base dir: C:\Users\Administrator\Documents\sonar-projects\PMC
13:22:40.575 INFO - Working dir: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
13:22:40.576 INFO - Source dirs: e:\Development\mistral\PMC\trunk
13:22:40.576 INFO - Source encoding: UTF-8, default locale: en_US
13:22:40.902 INFO - Sensor CxxSourceImporter...
13:22:42.888 INFO - Sensor CxxSourceImporter done: 1986 ms
13:22:42.889 INFO - Sensor CpdSensor...
13:22:42.889 INFO - SonarBridgeEngine is used
13:22:42.985 INFO - Cross-project analysis disabled
net.sourceforge.pmd.cpd.cppast.TokenMgrError: Lexical error in file e:\Development\mistral\PMC\trunk\AppServer\ApplicationDistributionScheduler\Logic\ActivateItvApplicationOnMcmDistributionRequestP
essor.cs at line 1, column 1. Encountered: "\ufeff" (65279), after : ""
at net.sourceforge.pmd.cpd.cppast.CPPParserTokenManager.getNextToken(CPPParserTokenManager.java:1655)
at net.sourceforge.pmd.cpd.CPPTokenizer.tokenize(CPPTokenizer.java:26)
at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:60)
at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:52)
at org.sonar.plugins.cpd.SonarBridgeEngine.analyse(SonarBridgeEngine.java:102)
at org.sonar.plugins.cpd.CpdSensor.analyse(CpdSensor.java:80)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
at org.sonar.batch.phases.Phases.execute(Phases.java:101)
at org.sonar.batch.scan.ScanContainer.doStart(ScanContainer.java:147)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:65)
at org.sonar.batch.scan.ScanTask.scanRecursively(ScanTask.java:56)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:49)
at org.sonar.batch.bootstrap.TaskContainer.doStart(TaskContainer.java:188)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrap.TaskBootstrapContainer.executeTask(TaskBootstrapContainer.java:73)
at org.sonar.batch.bootstrap.TaskBootstrapContainer.doStart(TaskBootstrapContainer.java:62)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrap.BootstrapContainer.doStart(BootstrapContainer.java:104)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:88)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:72)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
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.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:75)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:63)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:57)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:71)
at org.sonar.runner.api.Runner.execute(Runner.java:89)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Skipping e:\Development\mistral\PMC\trunk\AppServer\ApplicationDistributionScheduler\Logic\ActivateItvApplicationOnMcmDistributionRequestProcessor.cs due to parse error
net.sourceforge.pmd.cpd.cppast.TokenMgrError: Lexical error in file e:\Development\mistral\PMC\trunk\AppServer\ApplicationDistributionScheduler\Logic\ApplicationDistributionRequestProcessor.cs at l
1, column 1. Encountered: "\ufeff" (65279), after : ""
at net.sourceforge.pmd.cpd.cppast.CPPParserTokenManager.getNextToken(CPPParserTokenManager.java:1655)
at net.sourceforge.pmd.cpd.CPPTokenizer.tokenize(CPPTokenizer.java:26)
at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:60)
at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:52)
at org.sonar.plugins.cpd.SonarBridgeEngine.analyse(SonarBridgeEngine.java:102)
at org.sonar.plugins.cpd.CpdSensor.analyse(CpdSensor.java:80)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
at org.sonar.batch.phases.Phases.execute(Phases.java:101)
at org.sonar.batch.scan.ScanContainer.doStart(ScanContainer.java:147)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:65)
at org.sonar.batch.scan.ScanTask.scanRecursively(ScanTask.java:56)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:49)
at org.sonar.batch.bootstrap.TaskContainer.doStart(TaskContainer.java:188)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrap.TaskBootstrapContainer.executeTask(TaskBootstrapContainer.java:73)
at org.sonar.batch.bootstrap.TaskBootstrapContainer.doStart(TaskBootstrapContainer.java:62)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrap.BootstrapContainer.doStart(BootstrapContainer.java:104)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:88)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:72)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
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.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:75)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:63)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:57)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:71)
at org.sonar.runner.api.Runner.execute(Runner.java:89)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Skipping e:\Development\mistral\PMC\trunk\AppServer\ApplicationDistributionScheduler\Logic\ApplicationDistributionRequestProcessor.cs due to parse error
The thing is, I have set the sourceEncoding to UTF-8 but the files throwing the error are also encoded in UTF-8 (see below):
These might be simple beginner errors but I cannot find a quick/easy fix for this. Could you help on my way?
The .doc file is scanned because its file name ends with 'c'.
The c++ plugin's default source suffixes are: cxx,cpp,cc,c
Notice that there isn't any dot '.' character in there. So any file whose file name ends with 'c' character will be taken: abc, ab.c, a.bc. The same apply for the other suffixes.
If you want exact suffixes, you need to use something like this:
sonar.cxx.suffixes.sources=.cxx,.cpp,.cc,.c