You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
getting java.lang.NoSuchMethodError: 'void io.kubernetes.client.openapi.models.V1Pod.validateJsonObject(com.google.gson.JsonObject)' at
Server (please complete the following information):
Locally on MAC OS 14.5
Additional context
java.lang.NoSuchMethodError: 'void io.kubernetes.client.openapi.models.V1Pod.validateJsonObject(com.google.gson.JsonObject)'
at io.kubernetes.client.openapi.models.V1Pod$CustomTypeAdapterFactory$1.read(V1Pod.java:309)
at io.kubernetes.client.openapi.models.V1Pod$CustomTypeAdapterFactory$1.read(V1Pod.java:299)
at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:308)
at com.google.gson.Gson.fromJson(Gson.java:1361)
at com.google.gson.Gson.fromJson(Gson.java:1262)
at com.google.gson.Gson.fromJson(Gson.java:1171)
at com.google.gson.Gson.fromJson(Gson.java:1137)
at io.kubernetes.client.openapi.JSON.deserialize(JSON.java:778)
at io.kubernetes.client.openapi.ApiClient.deserialize(ApiClient.java:895)
at io.kubernetes.client.openapi.ApiClient.handleResponse(ApiClient.java:1105)
at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:1029)
at io.kubernetes.client.openapi.apis.CoreV1Api.createNamespacedPodWithHttpInfo(CoreV1Api.java:10876)
at io.kubernetes.client.openapi.apis.CoreV1Api$APIcreateNamespacedPodRequest.execute(CoreV1Api.java:10972)
The text was updated successfully, but these errors were encountered:
21.0.0 changed the underlying code generator and is incompatible with older versions, I suspect that you somehow have older versions of some parts of the client in your classpath somewhere.
You can use 21.0.0-legacy to maintain the old code generator, but you probably need to clean up your dependencies rather than stick to the legacy releases which will eventually be deprecated.
I had this same error, and it was due to multiple versions of the Kubernetes Java Client on the classpath. Fixing up my project's dependencies to only include a newer version fixed the issue.
Describe the bug
getting java.lang.NoSuchMethodError: 'void io.kubernetes.client.openapi.models.V1Pod.validateJsonObject(com.google.gson.JsonObject)' at
after upgrading to 21.0.0
Client Version
21.0.0
Kubernetes Version
v1.28.3+k3s2
Java Version
Java 11
To Reproduce
Steps to reproduce the behavior:
Expected behavior
should not throw error
KubeConfig
I am using colima
Server (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: