Skip to content

Potential regression between java8 and java11 (invocation recompiles the .jar classes) #2787

Description

@kwojcik-blockether

Description:

When using java11 version of rapid image it seems that runtime tries to recompile files in .jar file. This issue did not happen on java8 runtime. Before introducing version 1.21 of sam-cli this error happened only when invoking function directly on java11. Now happens even when using sam local start-api.

Since I got the same issue not only when invoking function directly I doubt it's a problem of a language (Clojure). I suspect the problem here is the runtime. Compiling&Running the same code with GraalVM Java11 (specs are included) does not trigger the error.

Steps to reproduce:

Reproduction here: kwojcik-blockether/holy-lambda#26

Expected result:

I would expect that the lambda function would run seamlessly the same as it was running on java8.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Windows, Mac, Linux
  2. sam --version: 1.21, 1.19
  3. AWS region: does not matter

EDIT: Please use the following commit: kwojcik-blockether/holy-lambda@848e40a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions