-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Java 16 #261
Comments
I had the same issue and solved it by forking and releasing an internal version. The issue is that I solved it by removing all modifications to the environment (by removing all usages of The X-Ray tracing will probably break because of this but we're not using it so that's not an issue for us. |
I found another solution to this issue. You can pass This should really be fixed though. The library uses a lot of reflection and that is causing some issues when compiling with Graal native-image. |
Hi .. can you please confirm which Java version you could fix this issue ? I have same issue but the stack trace is different. I am using JDK 17, Junit 5. org.opentest4j.MultipleFailuresError: Multiple Failures (2 failures) |
@vpatil1311 I was using OpenJDK 16 at the time. I'm no longer involved with that project so can't comment on whether or not they have moved on to later releases. |
@smoell Can you please provide details on what fixed the issue for you ? is it to downgrade to JDK 15 ? |
There's two different solutions in my comments right above your |
@Raniz85 thanks for responding. --add-opens approach did work for me when I execute the independent test class inside eclipse. But I am not able to fix my apache MAVEN v3.8 build which uses a maven-surefire-report-plugin to execute the tests. This is a spring boot service. I am using Oracle JDK 17. |
@vpatil1311 how are you using Java 17 on Lambda? |
@vpatil1311 Can't help you there unfortunately. I haven't worked with Maven or Eclipse for almost 10 years. @msailes Using custom runtimes |
@vpatil1311 I imagine there is a property in the surefire plugin to accept additional arguments. |
good stuff, do you have a PR for it? |
Just wanted to update the thread for later reference. I could fix it in Maven build as well by using --add-opens in maven-surefire-plugin. maven-surefire-report-plugin is not honoring --add-opens for some reason. Thanks everybody for responding. |
Java does not have a good mechanism for modifying environment variables.
I feel like the Context object is a better home for the dynamic properties of an event. Moving It would be good to hear from the community. How much effort would it require for you to migrate away from the environment variable to use a property in the Context? Other thoughts on the topic are welcome :-) |
@smirnoal I agree that moving |
Good point @faermanj The frameworks would still have access to all environment variables which Lambda defines. Except for |
Found just now that the X-Ray Java SDK had an alternative to environment variables contributed last year, using |
ENTRYPOINT [ "java", "-cp", "/function/*", "--add-opens", "java.base/java.util=ALL-UNNAMED", "com.amazonaws.services.lambda.runtime.api.client.AWSLambda" ]
|
This is fixed since version 2.3.0 in aws-lambda-java-runtime-interface-client, resolving |
I've noticed an issue with Java 16
The Dockerfile is
With JDK 15 as runtime, everything works as expected.
The text was updated successfully, but these errors were encountered: