Skip to content

Add support for JDK 15 #4281

Closed
Closed
@Thihup

Description

@Thihup

Description of the issue
We've recently changed our build to use JDK 15. However, the CodeQL reports it cannot find any source [1].
Looking in the logs, there is an exception at the start of the build [2].
As far as I can tell, there is a Java agent that read classes, but it doesn't support JDK 15.

[1]

/opt/hostedtoolcache/CodeQL/0.0.0-20200826/x64/codeql/codeql database finalize /home/runner/work/_temp/codeql_databases/java
  No source code was seen during the build.
  This can occur if the specified build commands failed to compile or process any code.
   - Confirm that there is some source code for the specified language in the project.
   - For codebases written in Go, JavaScript, TypeScript, and Python, do not specify 
     an explicit --command.
   - For other languages, the --command must specify a "clean" build which compiles 
     all the source code files without reusing existing build artefacts.
  ##[error]The process '/opt/hostedtoolcache/CodeQL/0.0.0-20200826/x64/codeql/codeql' failed with exit code 32
  Error: The process '/opt/hostedtoolcache/CodeQL/0.0.0-20200826/x64/codeql/codeql' failed with exit code 32
      at ExecState._setResult (/home/runner/work/_actions/github/codeql-action/v1/node_modules/@actions/exec/lib/toolrunner.js:548:25)
      at ExecState.CheckComplete (/home/runner/work/_actions/github/codeql-action/v1/node_modules/@actions/exec/lib/toolrunner.js:531:18)
      at ChildProcess.<anonymous> (/home/runner/work/_actions/github/codeql-action/v1/node_modules/@actions/exec/lib/toolrunner.js:431:27)
      at ChildProcess.emit (events.js:210:5)
      at maybeClose (internal/child_process.js:1021:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

[2]

java.lang.IllegalArgumentException: Unsupported class file major version 59
	at com.semmle.org.objectweb.asm.ClassReader.<init>(ClassReader.java:195)
	at com.semmle.org.objectweb.asm.ClassReader.<init>(ClassReader.java:176)
	at com.semmle.org.objectweb.asm.ClassReader.<init>(ClassReader.java:162)
	at com.semmle.extractor.java.InterceptingAgent.transform(InterceptingAgent.java:262)
	at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
	at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563)
	at java.base/java.lang.ApplicationShutdownHooks.<clinit>(ApplicationShutdownHooks.java:42)
	at java.base/java.lang.Runtime.addShutdownHook(Runtime.java:215)
	at org.apache.maven.shared.utils.logging.MessageUtils.registerShutdownHook(MessageUtils.java:201)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	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:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions