Failed to start Sonar on Vista
Sonar seems unable to start when installed under the Folder Program Files in VISTA. It should therefore not be installed there.
Source code does not show up in drilldowns
This behavior can happen sometimes after a version migration. Here is a check list that should resolve the issue :
- Empty your browser cache
- Run a new project analysis after migration
- Make sure the new version was installed in a fresh directory, not overriding the previous version
- Upgrade to 1.11.1 if you are in 1.11
If source code is still not displayed, then send an email to user mailing-list .
Sonar seems to access the wrong schema on Oracle
When having 2 Sonar schema on the same Oracle instance, especially if they are in 2 different versions, Sonar can get confused and picks the first it finds. In that case, there are two known work around :
1. Remove the DBA rights to the Sonar users in oracle
2. Use sonar.hibernate.default_schema in sonar.properties to set the schema. In that case, -Dsonar.hibernate.default_schema should be used as well during project analysis.
I have locked myself out
There is currently nothing that stops you removing from every user and every group the global administrator role. the global administrator role. You then have no other solution than make an manual update in the Sonar database to get back in control.
How to remove false positive violations ?
You can use the mechanism embedded in underlying rules violation engine (//NOPMD...) or the generic mechanism implemented in Sonar : Put //NOSONAR at the end of the line of the violation. This will suppress the violation.
I lost the admin password
In case you lost the admin password of your Sonar instance, you can reset it by running the following update statement :
This will reset the password to admin.
Maven mirrors : the maven plugin fails to resolve org.codehaus.sonar.runtime.* dependencies
Sonar embeds its own maven repository which is used by the Sonar maven plugin to download all Sonar extensions like pmd, checkstyle, findbugs, etc. If you get this error, it's certainly because your Maven configuration prevents Sonar from accessing its own Maven repository. Your maven settings.xml file must certainly contain a section called <mirror> which should look like this :
According to this section, Maven redirects all calls to the repository called 'nexus', so Sonar maven repository is never touched and Sonar maven plugin fails to resolve org.codehaus.sonar.runtime.* dependencies. Two solutions to solve this issue:
- If you have Maven version 2.0.9 or higher, just change the value of <mirrorOf> by
* Or configure your central maven repository (eg. Nexus, Archiva or Artifactory) to use the Sonar internal repository (http://sonar:9000/deploy/maven). If you use Nexus, take a look to the section "Declare the Sonar Maven Repository inside Nexus" in the Full installation in 5 steps.
Corbertura exception on Linux System while accessing the cobertura.ser file
When reading the cobertura.ser file, the Cobertura Maven plugin tries to get a lock on that file. This locking mechanism generates an exception on Linux Systems SONAR-172.
The current workaround is to add the following lines to the pom.xml file (thanks to Wouter de Vaal) :
The plugin 'org.apache.maven.plugins:maven-sonar-plugin' does not exist or no valid version could be found
If you get this error message after launching the maven command line "mvn sonar:sonar" add the "-U" parameter to the command line. Maven will then update its local repository with the latest version of the Sonar Maven plugin.
If adding the "-U" parameter doesn't fix your issue, you've certainly encountered Maven bug MNG-4001. The only known workaround is to delete the org\codehaus\mojo directory in your local Maven repository. Of course, if your local Maven repository is synchronized with a repository manager like Nexus, this operation must be also done on the repository manager side.
Maven fails with 'java.lang.OutOfMemoryError'
Increase the maven available memory by setting the environment variable :
I get a SecurityException when I execute the maven plugin
The message of the root exception is
The CGLIB library available in your Maven repository is certainly signed which is not the case on IBIBLIO repository. Perhaps you or your Maven administrator have signed this jar to include it into a Java Web Start application. Unfortunately signing CGLIB jar file breaks Hibernate's use of CGLIB, as it generates proxy classes in the same package (org.sonar.commons.database.* for our context) as the original class. But the original Sonar class is not signed and the new proxy class is, generating a java.lang.SecurityException.
You must also sign Sonar libraries in your Maven repository or used unsigned CGLIB library.
The analysis fails because of Maven Enforcer violations
You have to add the parameter -Denforcer.skip=true to the Maven command-line.
Failed to resolve stax2-api artifact
The following error occurs when using Maven Archiva 1.1. It must be upgraded to 1.2.1.