简体   繁体   中英

SonarQube 6.3 fails on trying to scan a binary file

after successfully upgrading from sonarqube 6.2 to 6.3 the analyzation process of one project fails. The error message is Unable to read the source file : '.../ajax.gif' with the charset : 'UTF-8'. Input length = 1 Unable to read the source file : '.../ajax.gif' with the charset : 'UTF-8'. Input length = 1 . When I run file .../ajax.gif then I get GIF image data, version 89a, 220 x 19 as expected. Before upgrading to 6.3 everything was working fine.

Here is the complete output:

CLI command: mvn clean sonar:sonar

Outcome:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building pp-scratch 1.1.17-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- sonar-maven-plugin:3.2:sonar (default-cli) @ pp-scratch ---
[INFO] User cache: /home/thomas/.sonar/cache
[INFO] Load global settings
[INFO] Load global settings (done) | time=235ms
[INFO] User cache: /home/thomas/.sonar/cache
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=9ms
[INFO] Plugin [l10nde] defines 'l10nen' as base plugin. This metadata can be removed from manifest of l10n plugins since version 5.2.
[INFO] SonarQube version: 6.3.0
[INFO] Default locale: "en_US", source code encoding: "UTF-8"
[INFO] Process project properties
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=124ms
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=85ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=539ms
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=103ms
[INFO] Publish mode
[INFO] Project key: de.tln:pp-scratch
[INFO] -------------  Scan pp-scratch
[INFO] Excluded sources for coverage: 
[INFO]   **/*DTO.java
[INFO] Load server rules
[INFO] Load server rules (done) | time=97ms
[INFO] Initializer GenericCoverageSensor
[INFO] Initializer GenericCoverageSensor (done) | time=0ms
[INFO] Base dir: /home/thomas/workspace/aexit/pp-scratch
[INFO] Working dir: /home/thomas/workspace/aexit/pp-scratch/target/sonar
[INFO] Source paths: src/main/webapp, pom.xml, src/main/java
[INFO] Test paths: src/test/java
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] Excluded sources: 
[INFO]   **/*.min.css
[INFO]   **/*.min.js
[INFO]   src/main/webapp/resources/bootstrap/**
[INFO]   **/entity/*.java
[INFO] 210 files indexed
[INFO] 7 files ignored because of inclusion/exclusion patterns
[INFO] Quality profile for css: Sonar way
[INFO] Quality profile for java: TLN
[INFO] Quality profile for js: Sonar way
[INFO] Quality profile for web: Sonar way
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.309 s
[INFO] Finished at: 2017-03-24T08:18:22+01:00
[INFO] Final Memory: 61M/514M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project pp-scratch: Unable to read the source file : '/home/thomas/workspace/aexit/pp-scratch/src/main/webapp/resources/app/ajaxloadingbar.gif' with the charset : 'UTF-8'. Input length = 1 -> [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

You are facing the following bug: SONAR-8995

It will be fixed in SonarQube 6.3.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM