Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- what are you trying to achieve
- what have you tried so far to achieve this
I have a project with Java 11, and SonarQube version 6.5 installed.
When I call for SonarQube for scanning using “mvn sonar:sonar”, it gives javax/xml/bind/JAXBException, portion of the error below.
Things I have tried but did not work
I googled that Java 11 package for javax.xml.bind does not exist anymore, so in order to fix this issue, need to manually add the JAXB Maven dependencies (Jaxb-core, Jaxb-api, Jaxb-impl) to project’s pom.xml which i have added
Another suggestion is to add “sonar-maven-plugin” which i have added
One also suggested to check the availability of “sonar-java-plugin” in the SonarQube installation’s plugin folder, which i have checked and is available
Let’s assume that upgrading the version of SonarQube is not readily available unless backed by strong evidence that the current setup definitely will not work.
Any help is welcome.
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:18.104.22.1683:sonar (default-cli) on project myapp: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:22.214.171.1243:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:126.96.36.1993:sonar: javax/xml/bind/JAXBException [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:188.8.131.523 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls = path-to-m2/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/184.108.40.2063/sonar-maven-plugin-220.127.116.113.jar [ERROR] urls = path-to-m2/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar [ERROR] urls = path-to-m2/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar [ERROR] urls = path-to-m2/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar [ERROR] urls = path-to-m2/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar [ERROR] urls = path-to-m2/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar [ERROR] urls = path-to-m2/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar [ERROR] urls = path-to-m2/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/18.104.22.1687/sonar-scanner-api-22.214.171.1247.jar [ERROR] urls = path-to-m2/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar [ERROR] urls = path-to-m2/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] ----------------------------------------------------- [ERROR] : javax.xml.bind.JAXBException [ERROR] -> [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] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException