I have the same issues. Are there any plans to support OpenJDK 14?
ERROR: Error during SonarQube Scanner execution
java.lang.NoClassDefFoundError: java/util/jar/Pack200
at org.sonar.scanner.bootstrap.PluginFiles.unpack200(PluginFiles.java:165)
at org.sonar.scanner.bootstrap.PluginFiles.download(PluginFiles.java:108)
at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:75)
Yeah you are right… maybe Java 13 “it works” only without support. But we are analyzing our projets in Java 13 since the end on last year.
I guess you don’t need a new future request to follow the market… just do it as other players are doing !!
...
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:205)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
...
Caused by: java.lang.NoClassDefFoundError: java/util/jar/Pack200
at org.sonar.scanner.bootstrap.PluginFiles.unpack200(PluginFiles.java:165)
at org.sonar.scanner.bootstrap.PluginFiles.download(PluginFiles.java:108)
at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:75)
...
Ran into this issue today as well. Sonar is now the only thing blocking us from upgrading our projects to Java 14.
Any workarounds for how a Java 14 project could be analyzed with Gradle Sonar plugin (we are using SonarCloud)?
Seems that Pack200 issue might be solved by somehow removing acceptCompression query param from the request. Not sure if that can be easily done. Maybe by using a temporarily forked copy of https://github.com/SonarSource/sonar-scanner-gradle?
And then there should be some way to force sonar plugin to use ASM 7.2+ dependency (https://asm.ow2.io/versions.html). Or should that happen on the server side, and there is nothing that can be done until official support is added?
We will fix the problem with pack200 but keep in mind that’s no guarantee that SonarQube/SonarCloud will be compatible with Java 14. Currently we don’t support Java 14 and we don’t run any tests with it.
We’re evaluating SonarCloud at the moment and the first thing we saw is that this fails becuase of the mentioned issue. @dmeneses Can we expect the fix to be implemented in SonarCloud anytime soon or will it take longer?
We can live with Java 14 not being officially supported, but if it’s not working at all, it would keep us from going anywhere beyond the evaluation phase.
Facing the same problem with quite common OpenJDK14 + Gradle6.4 + TravisCI + SonarCloudPlugin2.8 toolchain (build log). It seems that SonarCloud’s issue is the only one preventing the chain from building the project successfully.
We don’t need the full-fledged support of Java 14 code analysis by SonarCloud as well, so that “just working somehow” would be enough for us at first. Thank you!
I can confirm the previous NoClassDefFoundError issue is now resolved on SonarCloud - thank you very much!
Although analysis of Java 14 code still fails, now with the following exception:
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 58
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:195)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:176)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:162)
at org.sonar.java.bytecode.se.MethodLookup.lookup(MethodLookup.java:68)
at org.sonar.java.bytecode.se.MethodLookup.lookup(MethodLookup.java:60)
at org.sonar.java.bytecode.se.BytecodeEGWalker.execute(BytecodeEGWalker.java:316)
at org.sonar.java.bytecode.se.BytecodeEGWalker.getMethodBehavior(BytecodeEGWalker.java:293)
Seems that it is the outdated ASM dependency that is now the blocker.
You said you verified it, did you check the logs? Because I still get the aforementioned errors (recent build here). I also wonder how this is supposed to work technically—at least for Maven users—since there is no new plugin version (v3.7.0.1746 by the time writing this, see Maven Central). Or am I missing something?
Sincere question: If it is not dependent on the Scanner, how should I analyze the project using SonarCloud, given a Maven-based Java 14 project?
The corresponding documentation I found on sonarcloud.io (sorry if I overlooked something) suggests mvn sonar:sonar, but this is what gives me parse errors locally.
If you’re using SonarCloud, you should already be using SonarJava 6.6 (you can confirm by checking the scanner logs with debug enabled) and it should support Java 14.
If you still have errors, I suggest you create a separate post about it using the tags ‘sonarcloud’ and ‘java’.