Sonar - CSharp Plugins Ecosystem - Can not execute Sonar: Error while trying to get the next element name - sonarqube

Sonar CSharp Plugins Ecosystem is throwing error at the end of processing.
I have checked the coverage-report.xml and it only include one line.
<PartCoverReport version="4.0" date="2011-08-10T10:09:12.1721003+08:00" />
I think this is the possible reason for the error.
How can I fix this issue? Is this a configuration issue?
Thanks in advance.
Please see piece of error message below:
...
[INFO] Sensor org.sonar.plugins.csharp.fxcop.FxCopSensor#e6529c...
[INFO] Microsoft (R) FxCop Command-Line Tool, Version 10.0 (10.0.30319.1) X86
[INFO] Copyright (C) Microsoft Corporation, All Rights Reserved.
[INFO]
[INFO] Loading C:\JanusPilot\SonarDotnetExample\Example.Application\target\sonar \sonar.FxCop...
[INFO] Loaded DesignRules.dll...
[INFO] Loaded GlobalizationRules.dll...
[INFO] Loaded NamingRules.dll...
[INFO] Loaded PerformanceRules.dll...
[INFO] Loaded Example.Application.exe...
[INFO] Initializing Introspection engine...
[INFO] Analyzing...
[INFO] Analysis Complete.
[INFO] Writing 1 messages...
[INFO] Writing report to C:\JanusPilot\SonarDotnetExample\Example.Application\t
arget\sonar\fxcop-report.xml...
[INFO] Done:00:00:01.1050632
[INFO] Sensor org.sonar.plugins.csharp.fxcop.FxCopSensor#e6529c done: 2342 ms
[INFO] Sensor org.sonar.plugins.csharp.gallio.CoverageReportSensor#eb73e...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:14.037s
[INFO] Finished at: Wed Aug 10 10:13:29 CST 2011
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0-beta-2:s
onar (default-cli) on project example: Can not execute Sonar: Error while trying
to get the next element name: ParseError at [row,col]:[1,75]
[ERROR] Message: Can not call 'getLocalName(): cursor does not point to a valid
node (curr event [null]; cursor state CLOSED)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I am one of the developpers of the C# plugins.
You should rather ask for help by sending a mail to the sonar user mailing list.
Your partcover reports shows that partcover did not succeed to gather coverage measures suring test execution.
You have 3 solutions :
try ncover3
skip coverage
If you need more details, again, please drop a message to the user mailing list
Regards

Related

How to solve "Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar"?

I have some problems to execute command "mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=25d0a6a8a078272ad5c53e5c76fb15e6a4242736".
JDK 1.8
Sonarqube 7.4
Maven 3.5.4
How could I solve my troubles?
Below I post my screen code from git bash
[INFO] Calculating CPD for 599 files
[INFO] CPD calculation finished
[INFO] Analysis report generated in 18123ms, dir size=7 MB
[INFO] Analysis reports compressed in 4815ms, zip size=3 MB
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:49 min
[INFO] Finished at: 2019-12-19T11:28:56+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project traccar: Failed to upload report - An error has occurred. Please contact your administrator -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException```
You can have a look at this Sonarsource community discussion. The general policy is that there is only support for LTS versions. In your case you should plan to upgrade to version 7.9.2 and update all your plugins and (in this case) the scanner. You didn't explain why you state "have to use a specific version of Sonar". If you do not want the newest features, advise your Client only to use LTS versions.

Building SonarQube with maven and batch_boostrap/index cannot be found

I'm running mvn sonar:sonar in the directory of the project I'm running. I already have my pom.xml updated:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.7.1</version>
</plugin>
After running sudo mvn sonar:sonar (I am on ubuntu 14.04) in my terminal, I get the following error:
eschwartz#LATITUDE:~/ideaprojects/xQueryEngine$ sudo mvn sonar:sonar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xQueryEngine (Solr 4 REX) 1.11.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.7.1:sonar (default-cli) # xqe ---
[INFO] User cache: /root/.sonar/cache
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.854s
[INFO] Finished at: Wed Feb 17 15:56:59 EST 2016
[INFO] Final Memory: 17M/302M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project xqe: Fail to download libraries from server: Status returned by url : 'http://localhost:9000/batch_bootstrap/index' is invalid : 404 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Anyone know how to fix this?
Thanks.
You have to set sonar.host.url=http://localhost:9000/sonar. You can do this by passing -Dsonar.host.url=... to mvn, or ideally set it in your Maven Global/Project Settings so that you don't always have to pass it as a command line argument.
Details: if your dashboard is at localhost:9000/sonar then it means you're using sonar.web.context=/sonar , which is different from the default (/). So you need to tell the scanner where to find SonarQube.

Error when deploy github site with maven

With this maven pom file : https://gist.github.com/PhilippeGeek/44f62827bf73bc7d9368, I can't create a blob, the output is:
[INFO] ------------------------------------------------------------------------
[INFO] Building SpeleoGraph 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- site-maven-plugin:0.6:site (default-cli) # SpeleoGraph ---
[INFO] Creating 102 blobs
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.270s
[INFO] Finished at: Sat Jul 13 23:48:01 CEST 2013
[INFO] Final Memory: 9M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.github:site-maven-plugin:0.6:site (default-cli) on project SpeleoGraph: Error creating blob: Unexpected end of file from server -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
This problem come form an out-dated version of site-maven-plugin, you should use version 0.8 or more recent.
This may happen with version 0.8 and 0.9 also, when the binary to be deployed to github is over about 30MB.
Issue on github (see comments)
Reference to a work-around for reducing the size of the binary

java project not getting analysed in sonar 3.3.5

When I give mvn sonar:sonar for sample java project in sonar I get this error.The sample project is from link
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple Java Maven Project 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.0:sonar (default-cli) # example-java-maven ---
[INFO] Sonar version: 3.5.1
[INFO] [12:29:59.781] Load batch settings
[INFO] [12:30:00.000] User cache: C:\Documents and Settings\xxx\.sonar\cache
[INFO] [12:30:00.156] Install plugins
INFO] [12:30:03.250] ------------- Executing Project Scan
[INFO] [12:30:04.500] Install JDBC driver
INFO] [12:30:04.515] Apply project exclusions
[WARN] [12:30:04.531] H2 database should be used for evaluation purpose only
[INFO] [12:30:04.531] Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
[INFO] [12:30:04.890] Initializing Hibernate
[INFO] [12:30:09.500] ------------- Inspecting Simple Java Maven Project
[INFO] [12:30:09.515] Load module settings
[INFO] [12:30:09.937] Excluded tests:
[INFO] [12:30:09.937] **/package-info.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.125s
[INFO] Finished at: Thu Jun 13 12:30:11 IST 2013
[INFO] Final Memory: 9M/28M
[INFO] ------------------------------------------------------------------------
ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (d
efault-cli) on project example-java-maven: Can not execute Sonar: You must insta
ll a plugin that supports the language 'java' -> [Help 1]
ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
Should I manually put any plugin to analyze java project?
It looks like you have removed the Java plugins from your Sonar home directory. You can upload the latest version at http://docs.codehaus.org/display/SONAR/Java+Ecosystem, copy the plugins into SONAR_HOME/extensions/plugins and restart your Sonar server.

Maven - issue running mvn help:effective-pom

I am working through a basic Maven tutorial, and managed to create a simple archetype and run a mvn install. However, when trying to do a mvn help:effective-pom, I just seem to get this output:
mvn help:effective-pom [INFO] Scanning for projects... [INFO]
[INFO]
------------------------------------------------------------------------ [INFO] Building simple 1.0-SNAPSHOT [INFO]
------------------------------------------------------------------------ [INFO] [INFO] --- maven-help-plugin:2.2:effective-pom (default-cli) #
simple --- Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-parameter-documenter/2.2.1/maven-plugin-parameter-documenter-2.2.1.pom
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-parameter-documenter/2.2.1/maven-plugin-parameter-documenter-2.2.1.pom
[INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 0.925s [INFO] Finished at: Mon May 13 21:41:09 BST
2013 [INFO] Final Memory: 9M/131M [INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-help-plugin:2.2:effective-pom
(default-cli) on project simple: Execution default-cli of goal
org.apache.maven.plugins:maven-help-plugin:2.2:effective-pom failed:
Plugin org.apache.maven.plugins:maven-help-plugin:2.2 or one of its
dependencies could not be resolved: Failed to collect dependencies for
org.apache.maven.plugins:maven-help-plugin:jar:2.2 (): Failed to read
artifact descriptor for
org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1: Could
not transfer artifact
org.apache.maven:maven-plugin-parameter-documenter:pom:2.2.1 from/to
central (http://repo1.maven.org/maven2): Access denied to:
http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-parameter-documenter/2.2.1/maven-plugin-parameter-documenter-2.2.1.pom
-> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using
the -X switch to enable full debug logging. [ERROR] [ERROR] For more
information about the errors and possible solutions, please read the
following articles: [ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
not much hope for me if I cant get past "Hello World" example...any advice appreciated.
Regards
i
One of your network components blocks access to http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-parameter-documenter/2.2.1/maven-plugin-parameter-documenter-2.2.1.pom, that's all.

Resources