Runtime compatibility issue

Open
#415 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java

Research direction

Start with pom.xml and .rpdk-config, then reproduce mvn package using the Java 19 runtime described in the issue. Compare the runtime used by sam local and the JaCoCo failure; done means the project builds and local tests run without the unsupported class file error.

Written by the indexing model from the issue text.

Description

Summary

Cannot get mvn package to succeed as it fails running tests with the below runtime incompatiblity error.

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 63 at org.jacoco.agent.rt.internal_035b120.asm.ClassReader.<init>(ClassReader.java:195) at org.jacoco.agent.rt.internal_035b120.asm.ClassReader.<init>(ClassReader.java:176) at org.jacoco.agent.rt.internal_035b120.asm.ClassReader.<init>(ClassReader.java:162) at org.jacoco.agent.rt.internal_035b120.core.internal.instr.InstrSupport.classReaderFor(InstrSupport.java:279) at org.jacoco.agent.rt.internal_035b120.core.instr.Instrumenter.instrument(Instrumenter.java:74) at org.jacoco.agent.rt.internal_035b120.core.instr.Instrumenter.instrument(Instrumenter.java:106) ... 65 more

My intelliJ IDE uses Oracle Open JDK 19.0.2 JDK for the project. My pom.xml has the below source and target compiler definitions

image

I specified the runtime in .rpdk-config as "java19". I am using protocolVersion 2.0.0

I had also tried skipping the tests and generating the package. However, my sam local tests were then failing , again due to the runtime incompatibility error.

What are the recommended versions to set in each of these configs for this to work?

Dominant language
Java
Stars
30
Forks
48
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-cloudformation/cloudformation-cli-java-plugin

All issues in aws-cloudformation/cloudformation-cli-java-plugin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.