3

I am running command 'gradle sonarqube --stacktrace" which started resulting in the following:

Analysis report generated in /Users/shashank.devan/dev/myproject/build/sonar/batch-report
23:38:14.994 DEBUG - Couldn't delete lock file: /Users/shashank.devan/dev/myproject/./.sonar_lock java.nio.file.NoSuchFileException: /Users/shashank.devan/dev/myproject/./.sonar_lock
> Buildiat sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
    at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
    at java.nio.file.Files.delete(Files.java:1126)
    at org.sonar.home.cache.DirectoryLock.unlock(DirectoryLock.java:98)
    at org.sonar.batch.scan.ProjectLock.stop(ProjectLock.java:57)..
..
 What went wrong:
Execution failed for task ':myproject:sonarqube'.
> Unable to execute Sonar

Did I miss something? The command was working fine for other directories.

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
knash
  • 369
  • 1
  • 4
  • 8

1 Answers1

0

I faced this error recently. Analysis successful but report processing failed[Saying .sonarlock file couldn't be deleted]

  1. I had warnings in the build but no error. we need to check the logs of sonar analysis for more information.So from build console navigate to sonar url.

    [INFO] [20:02:34.373] ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/com.app Click on Administration->background tasks->(check your failed build with logs link at end)->open logs to check the error.

  2. I had validation failed error for multimodule mvn project in sonar logs.

org.sonar.api.utils.MessageException: Validation of project failed:

o Module "com.app:app-bootstrap" is already part of project "com.app:appco"

Fixed it by updating the group id's of all my projects modules and submodules.

Saran
  • 69
  • 7