Search code examples
sonarqubesonar-runner

Fail to decorate - Sonar Analysis


I am facing an issue when trying to run the sonar analysis. It is failing with the following exception

Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'org.sonar.api.resources.File@4959e9b7[key=src/main/java/com/mycompany/myproject/common/entities/beans/CountryBean.java,deprecatedKey=com.mycompany.myproject.common.entities.beans.CountryBean,path=src/main/java/com/mycompany/myproject/common/entities/beans/CountryBean.java,dir=com/mycompany/myproject/common/entities/beans,filename=CountryBean.java,language=Java]' at     org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:103)

The complete error stack trace is http://pastebin.com/zuTH61q9

How do I fix this issue? I have another project which is working fine without any error with the same configuration.

My sonarqube version is 5.0


Solution

  • I could fix the issue by deleting the java file and create a new file with the same contents.