1、错误代码
/domain/xxxx.java for block at line 44. Keep only the first 100 references.
WARN: Too many duplication references on file src/main/java/com/easy3w/ebs/pb/be
/domain/xxxx.java for block at line 47. Keep only the first 100 references.
WARN: Too many duplication references on file src/main/java/com/easy3w/ebs/pb/be
/domain/PBBE0111.java for block at line 44. Keep only the first 100 references.
INFO: CPD calculation finished
INFO: Analysis report generated in 7791ms, dir size=44 MB
INFO: Analysis reports compressed in 7968ms, zip size=14 MB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 16:14.080s
INFO: Final Memory: 29M/656M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Failed to upload report - 500: An error has occurred. Please contact your
administrator
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging
.
D:\xxx\project\xx\code\branch\dev\xxx>sonar-scanner
INFO: Scanner configuration file: D:\sonar-scanner-3.2.0.1227-windows\bin\..\con
f\sonar-scanner.properties
INFO: Project root configuration file: D:\xxx\project\xxx\code\branch\dev\d
xxx\sonar-project.properties
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: User cache: C:\Users\Administrator\.sonar\cache
INFO: SonarQube server 7.2.1
INFO: Default locale: "zh_CN", source code encoding: "UTF-8"
2、解决方案一
2.1、修改配置文件 可以编辑my.cnf来修改(windows下my.ini),在[mysqld]段或者mysql的server配置段进行修改。 max_allowed_packet = 20M 如果找不到my.cnf可以通过 mysql –help | grep my.cnf 去寻找my.cnf文件。 linux下该文件在/etc/下。 2.2、在mysql命令行中修改 在mysql 命令行中运行 set global max_allowed_packet = 2*1024*1024*10 然后退出命令行,重启mysql服务,再进入。 show VARIABLES like ‘%max_allowed_packet%’; 查看下max_allowed_packet是否编辑成功
3、方案二
修改配置文件
sonar.projectKey=xx:xxx
sonar.projectName=xxx
sonar.projectVersion=0.0.1-SNAPSHOT
sonar.sourceEncoding=UTF-8
sonar.sources=src/main/java/com/xxx/xxx ###指定文件的确切位置,使错误文件的大小减小
sonar.java.binaries=target/classes