sonargraph / sonar-sonargraph-integration

SonarQube Sonargraph Integration Plugin
16 stars 11 forks source link

Maven analysis fails after upgrading environment to Java 10 #14

Closed hildo closed 5 years ago

hildo commented 6 years ago

Hi. I have had a Maven Project using the sonar maven plugin for a while now, interacting with a SonarQube server. Up until know, I have been using Java 8 when building and performing static analysis.

However, when I change to use OpenJDK 10 (10.0.2), the sonar:sonar goal fails. The exception is

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.717 s
[INFO] Finished at: 2018-09-03T10:36:03+10:00
[INFO] Final Memory: 62M/214M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project minestar-core: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar: javax/xml/bind/ValidationEventHandler
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/hillmep/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.2/sonar-maven-plugin-3.2.jar
[ERROR] urls[1] = file:/C:/Users/hillmep/.m2/repository/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar
[ERROR] urls[2] = file:/C:/Users/hillmep/.m2/repository/com/sun/xml/bind/jaxb-impl/2.3.0/jaxb-impl-2.3.0.jar
[ERROR] urls[3] = file:/C:/Users/hillmep/.m2/repository/com/sun/xml/bind/jaxb-core/2.3.0/jaxb-core-2.3.0.jar
[ERROR] urls[4] = file:/C:/Users/hillmep/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
[ERROR] urls[5] = file:/C:/Users/hillmep/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[6] = file:/C:/Users/hillmep/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
[ERROR] urls[7] = file:/C:/Users/hillmep/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[8] = file:/C:/Users/hillmep/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[9] = file:/C:/Users/hillmep/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[ERROR] urls[10] = file:/C:/Users/hillmep/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.8/sonar-scanner-api-2.8.jar
[ERROR] urls[11] = file:/C:/Users/hillmep/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] urls[12] = file:/C:/Users/hillmep/.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.ValidationEventHandler
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project minestar-core: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar: javax/xml/bind/ValidationEventHandler
-----------------------------------------------------
realm =    plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.2
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/hillmep/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.2/sonar-maven-plugin-3.2.jar
urls[1] = file:/C:/Users/hillmep/.m2/repository/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar
urls[2] = file:/C:/Users/hillmep/.m2/repository/com/sun/xml/bind/jaxb-impl/2.3.0/jaxb-impl-2.3.0.jar
urls[3] = file:/C:/Users/hillmep/.m2/repository/com/sun/xml/bind/jaxb-core/2.3.0/jaxb-core-2.3.0.jar
urls[4] = file:/C:/Users/hillmep/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
urls[5] = file:/C:/Users/hillmep/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[6] = file:/C:/Users/hillmep/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
urls[7] = file:/C:/Users/hillmep/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
urls[8] = file:/C:/Users/hillmep/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[9] = file:/C:/Users/hillmep/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
urls[10] = file:/C:/Users/hillmep/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.8/sonar-scanner-api-2.8.jar
urls[11] = file:/C:/Users/hillmep/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
urls[12] = file:/C:/Users/hillmep/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar: javax/xml/bind/ValidationEventHandler
-----------------------------------------------------
realm =    plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.2
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/hillmep/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.2/sonar-maven-plugin-3.2.jar
urls[1] = file:/C:/Users/hillmep/.m2/repository/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar
urls[2] = file:/C:/Users/hillmep/.m2/repository/com/sun/xml/bind/jaxb-impl/2.3.0/jaxb-impl-2.3.0.jar
urls[3] = file:/C:/Users/hillmep/.m2/repository/com/sun/xml/bind/jaxb-core/2.3.0/jaxb-core-2.3.0.jar
urls[4] = file:/C:/Users/hillmep/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
urls[5] = file:/C:/Users/hillmep/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[6] = file:/C:/Users/hillmep/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
urls[7] = file:/C:/Users/hillmep/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
urls[8] = file:/C:/Users/hillmep/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[9] = file:/C:/Users/hillmep/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
urls[10] = file:/C:/Users/hillmep/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.8/sonar-scanner-api-2.8.jar
urls[11] = file:/C:/Users/hillmep/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
urls[12] = file:/C:/Users/hillmep/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:168)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 20 more
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar: javax/xml/bind/ValidationEventHandler
-----------------------------------------------------
realm =    plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.2
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/hillmep/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.2/sonar-maven-plugin-3.2.jar
urls[1] = file:/C:/Users/hillmep/.m2/repository/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar
urls[2] = file:/C:/Users/hillmep/.m2/repository/com/sun/xml/bind/jaxb-impl/2.3.0/jaxb-impl-2.3.0.jar
urls[3] = file:/C:/Users/hillmep/.m2/repository/com/sun/xml/bind/jaxb-core/2.3.0/jaxb-core-2.3.0.jar
urls[4] = file:/C:/Users/hillmep/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
urls[5] = file:/C:/Users/hillmep/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[6] = file:/C:/Users/hillmep/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
urls[7] = file:/C:/Users/hillmep/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
urls[8] = file:/C:/Users/hillmep/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[9] = file:/C:/Users/hillmep/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
urls[10] = file:/C:/Users/hillmep/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.8/sonar-scanner-api-2.8.jar
urls[11] = file:/C:/Users/hillmep/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
urls[12] = file:/C:/Users/hillmep/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:166)
    ... 21 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
    at com.hello2morrow.sonargraph.integration.access.controller.MetaDataControllerImpl.internLoadExportMetaData(MetaDataControllerImpl.java:104)
    at com.hello2morrow.sonargraph.integration.access.controller.MetaDataControllerImpl.loadExportMetaData(MetaDataControllerImpl.java:93)
    at com.hello2morrow.sonargraph.integration.sonarqube.api.SonargraphRulesRepository.loadDefaultConfigurationDataFromPlugin(SonargraphRulesRepository.java:291)
    at com.hello2morrow.sonargraph.integration.sonarqube.api.SonargraphRulesRepository.loadMetaDataForConfiguration(SonargraphRulesRepository.java:272)
    at com.hello2morrow.sonargraph.integration.sonarqube.api.SonargraphRulesRepository.getMetrics(SonargraphRulesRepository.java:94)
    at org.sonar.scanner.bootstrap.MetricProvider.provide(MetricProvider.java:49)
    at org.sonar.scanner.bootstrap.MetricProvider.provide(MetricProvider.java:31)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.install(ExtensionInstaller.java:61)
    at org.sonar.scanner.scan.ProjectScanContainer.addBatchExtensions(ProjectScanContainer.java:234)
    at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:117)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:133)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
    at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
    at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
    at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
    at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
    at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
    at com.sun.proxy.$Proxy23.execute(Unknown Source)
    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
    at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
    at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:78)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:122)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    ... 21 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.ValidationEventHandler
    at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
    ... 52 more

This looks like a reflection that Java 10 is no longer providing JavaEE modules by default. I have tried different approaches to allow the plugin to find these classes

None of the above helped. The plugin seems unable to find the jaxb classes.

I am using

Open JDK 10.0.2 Maven 10.0.2 sonar-maven-plugin 3.2 SonarJava 5.7.0.15470 SonarQube 6.7.2.37468 SonarGraph plugin 3.5 SonarGraph Integration plugin 2.0.1

Would updating the integration plugin help? I can see an update is there, but the release notes aren't clear as to Java 9/10 support is provided. I've been told that SonarQube, officially, doesn't support Java 10 yet, and I'm wondering if that needs to be added before the plugin?

Any information would be greatly appreciated.

Thanks, Ed

dietmarmenges commented 6 years ago

Hi Ed,

Thank you for contacting us. We will analyze the problem and contact you again as soon as we know more.

Sorry for the late reply.

Regards.

andreashoyerh2m commented 6 years ago

Hi Ed

Sonargraph integration plugin does not support Java 9/10 at the moment. We will change that as soon as newer versions of SonarQube support Java 9/10. The three approaches you tried went in the right direction, but failed because the dependencies to Jaxb must be added to Sonargraph integration plugin itself, at build time.

If running Sonargraph integration plugin with Java 8 is no option at all for you, we could provide a Java 10 prerelease.

Regards Andreas

hildo commented 6 years ago

Thanks for the feedback. We can make do by continuing with Java 8 in our analysis build. We have no plans to start using language features introduced in Java 10. If we want to in the future, though, it may cause us to be unable to use this tool to analyse our code. I will try to pay attention to the updates.

mprimeaux commented 6 years ago

Is there a prerelease of Sonar that works with Java 11? I'd be interested in testing it.

andreashoyerh2m commented 6 years ago

Hi Michael

Sonargraph integration plugin does not support Java 11 at the moment. As soon as we have a release supporting it we will let you know.

Regards Andreas

derkoe commented 5 years ago

Any news on this - Oracle Java 8 End of Public Updates is next month!!!

andreashoyerh2m commented 5 years ago

Hi Christian

Good news - we plan to release a new version of Sonargraph integration plugin running on Java 11 (and 8/9/10) next week.

Regards Andreas

ingmarkellner commented 5 years ago

Hi all,

I ran some tests with the upcoming Sonargraph Plugin version on Java 11. Whilst our plugin will run fine on Java 11, the SonarQube server and the Maven SonarQube Scanner itself are still not capable of running on anything newer than Java 8 without throwing exceptions. At least that's what my test has shown and what is available on the internet. See https://docs.sonarqube.org/latest/requirements/requirements/ More info is available on Stackoverflow: https://stackoverflow.com/questions/53496420/does-the-latest-sonarqube-work-with-java-11 And also on the SonarQube community forum: https://community.sonarsource.com/t/sonarqube-support-for-openjdk-11/3975

I was surprised to see the down-votes on the comments of my colleagues, and maybe it's worth repeating: We (company called "hello2morrow") provide this plugin that integrates the information from our tool "Sonargraph" into SonarQube (which is provided by "SonarSource"). We are not affiliated in any way with SonarSource, so if you are unhappy with SonarQube's support of newer Java versions, please give that feedback to them. We are the wrong tree to bark at.

Best regards, Ingmar

derkoe commented 5 years ago

@andreashoyerh2m guess the week is over ;-)

Any news on this?

derkoe commented 5 years ago

@ingmarkellner the SonarQube Scanner and Maven Plugin both work with Java 11. The server's Java version does not matter for this. I just tried SonarQube 6.7.6 (LTS) with up-to-date plugins and it can analyze our Java 11 application without problems.

Now we are just stuck with Sonargraph plugin. Could you provide the current version?

ingmarkellner commented 5 years ago

Hi Christian,

I just published a 3.0.0 pre-release of the plugin here @ Github. Hope that it works for you and we are happy to receive feedback. The official release to the SonarQube marketplace will follow but the release process takes its time. I tried again to execute the SonarQube Maven Scanner on Java 11, but it still fails on my Java project with the following exception (see below). I wonder how you get it to work?

Best regards Ingmar

[ERROR] Unable to create symbol table for : D:\00_repo\sonar-sonargraph-integration\src\main\java\com\hello2morrow\sonargraph\integration\sonarqube\SonargraphRules.java java.lang.IllegalArgumentException: null at org.objectweb.asm.ClassReader.(ClassReader.java:185) at org.objectweb.asm.ClassReader.(ClassReader.java:168) at org.sonar.java.resolve.BytecodeCompleter.loadClass(BytecodeCompleter.java:228) at org.sonar.java.resolve.Symbols.(Symbols.java:176) at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:58) at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:101) at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:96) at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:68) at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:119) at org.sonar.java.JavaSquid.scan(JavaSquid.java:113) at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:84) at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53) at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68) at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48) at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121) at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy66.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185) at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137) at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:65) at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:104)

derkoe commented 5 years ago

Just tried the new version and at least it does not break projects without Sonargraph. I have to ask my colleges using Sonargraph to give it a try.

If you want to use Java 11 you have to update all your plugins to the current versions - at least the https://docs.sonarqube.org/display/PLUG/SonarJava plugin.

You can even use Java 11 for the SonarQube server - with version 3.0.0 of your plugin the server starts under OpenJDK 11 (with the old it fails).

ingmarkellner commented 5 years ago

@derkoe Thanks for the feedback!

Ok, the SonarJava plugin update was the missing piece. I was assuming that I get the latest and greatest of the standard plugins, when I download the latest LTS version, but that was not the case... Now the SonarQube analysis works on my machine without errors when executing Maven on Java 11.

Java 11 support of SonarQube server still seems to be unofficial: https://docs.sonarqube.org/latest/requirements/requirements/ Or do you have another source for official information on this topic?

derkoe commented 5 years ago

Nope SonarQube officially requires OpenJDK 8 but it works under OpenJDK 11 as well.