java icon indicating copy to clipboard operation
java copied to clipboard

Getting java.lang.NoSuchMethodError after upgraing to 21.0.0

Open munishchouhan opened this issue 1 year ago • 3 comments
trafficstars

Describe the bug getting java.lang.NoSuchMethodError: 'void io.kubernetes.client.openapi.models.V1Pod.validateJsonObject(com.google.gson.JsonObject)' at

k8sClient.coreV1Api()
                .createNamespacedPod(namespace, spec)
                .execute()

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):

  • 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)

munishchouhan avatar Jul 05 '24 11:07 munishchouhan