-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Client is not compatible with Java 16 #1638
Comments
Thanks for reporting. We'll add Java16 to our CI/CD validation and see what happens. |
I think I have a similar issue. I just moved from Java 11 to 16 and found this problem. I'm using Maven and the Spring Cloud Kubernetes project |
WIP in #1669 |
an effective workaround for now is to add |
You can also set |
Since Project Jigsaw was introduced, a lot of downstream dependencies are struggling with adopting. As in general these workarounds of course work, they are not very well applicable in the real world. If you have a lets say platform consisting of a lot of services you have a lot of places where you need to apply this workaround. Often, you have to adopt multiple places for a single service, what is a bit cumbersome:
These points are often not that automatable then somethign like just updating a dependency. I really appreciate your hints for the workarounds, but to my eyes the cleaner solution is to really get rid of using JDK API that is intended as internal. This solution is much cleaner and less error prone than going with the workarounds. Not relying on internal API should also make supporting new JDK versions much easier. Looking forward having this done and merged into Spring Cloud ✌️ |
The fix that was made by @yue9944882 is now being used in the snapshots of spring cloud Kubernetes and will be included in our next release. |
@ryanjbaxter @holgerstolzenberg note that the fix wasnt actually fixing the compatibility issue, it's a workaround for avoiding inaccessibilities via reflection for those auto-configurations enabled by default. (which is targetting the error stacktrace reported in this issue). we will keep looking for a finer fix w/ ideally no user cost for workaround |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Was this fixed? This is important as the Java ecosystem will soon transition to its LTS version Java 17 in September I think. |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
/close as this is fixed by #2078 |
@yue9944882: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Describe the bug
I tried to upgrade a Spring Boot app from Java 14 to 16. The app also includes Spring Cloud which under the hood uses the Kubernetes client library. The app fails to start up do to an illegal access of KubernetesFromYamlProcessor.
Here is the full stacktrace:
The problem seems not to occur on Java-15.
Client Version
e.g.
11.0.1
Kubernetes Version
n/a (app doesn´t even start up as Spring Context cannot initialize)
Java Version
Java-16 (adoptopenjdk16 via
sdkman
installation)To Reproduce
Create a simple spring boot app with spring cloud and use the features to consume a ConfigMap from K8N or OKD.
Expected behavior
Application can launch.
KubeConfig
n/a
Environment
Local development machine:
Additional context
Issue was falsely initially raised at Spring Boot project:
spring-projects/spring-boot#25924
The text was updated successfully, but these errors were encountered: