Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 警告-无法通过类加载器访问类“XXX/XXX/XXX”_Java_Sonarqube - Fatal编程技术网

Java 警告-无法通过类加载器访问类“XXX/XXX/XXX”

Java 警告-无法通过类加载器访问类“XXX/XXX/XXX”,java,sonarqube,Java,Sonarqube,首先,我知道。因为我既不使用maven也不使用jenkins,所以无法使用提供的解决方案 在使用sonar runner分析我的项目时,我得到以下警告: Class 'XXX/XXX/XXX' is not accessible through the ClassLoader 在我项目的每一节课上。我还从jacoco coverage插件中得到以下警告: No JaCoCo analysis of project coverage can be done since there is no c

首先,我知道。因为我既不使用maven也不使用jenkins,所以无法使用提供的解决方案

在使用sonar runner分析我的项目时,我得到以下警告:

Class 'XXX/XXX/XXX' is not accessible through the ClassLoader
在我项目的每一节课上。我还从jacoco coverage插件中得到以下警告:

No JaCoCo analysis of project coverage can be done since there is no class files.
我的sonar runner属性定义如下:

sonar.sources=com // sources are analysed
sonar.tests=Tests/JUnit/com // works, since wrong location results in an error
sonar.binaries=bin/com // no presence in logs
sonar.java.libraries=dependencies/*.jar // no presence in logs. 
sonar.junit.reportsPath=rapports/junit // results are displayed
sonar.java.coveragePlugin=jacoco
sonar.jacoco.reportPath=rapports/jacoco/coverage.exec // not logged
不用说,我检查了各种路径事件,并用它们的绝对对应项替换它们,或者用二进制文件列出每个jar,但我无法进行分析


您对可能出现的问题有什么看法吗?

您的项目结构看起来像旧的Eclipse/WSAD结构,其中在根目录上有源代码,并为编译的类提供了一个bin/文件夹。您的应用程序代码看起来有一个以com开头的包定义

所以我想这就是你的结构:

project root +-- * = source files +-- bin/* = compiled files +-- Tests/JUnit/* = test source files +-- dependencies/*.jar = extra JAR files +-- rapports/junit/* = JUnit test results +-- rapports/jacoco/coverage.exec = Jacoco results
您的项目结构看起来像旧的Eclipse/WSAD结构,其中根目录上有源代码,编译的类有一个bin/文件夹。您的应用程序代码看起来有一个以com开头的包定义

所以我想这就是你的结构:

project root +-- * = source files +-- bin/* = compiled files +-- Tests/JUnit/* = test source files +-- dependencies/*.jar = extra JAR files +-- rapports/junit/* = JUnit test results +-- rapports/jacoco/coverage.exec = Jacoco results
我将检查此配置,谢谢!你有更多关于什么是sonar.includes的信息吗?我复制并粘贴了错误的库路径,我现在已经修复了它。但是,如果您仍然收到错误,那么您的依赖项中缺少依赖项folderI将检查此配置,谢谢!你有更多关于什么是sonar.includes的信息吗?我复制并粘贴了错误的库路径,我现在已经修复了它。但是,如果仍然出现错误,那么您将丢失dependencies文件夹中的依赖项
sonar.inclusions=com/trajano/project/**