Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

java.lang.NoSuchMethodError when creating Sidecar #132

Closed
enrique-fernandez-polo opened this issue Apr 12, 2021 · 1 comment
Closed

java.lang.NoSuchMethodError when creating Sidecar #132

enrique-fernandez-polo opened this issue Apr 12, 2021 · 1 comment

Comments

@enrique-fernandez-polo
Copy link

Hello all!

I am trying to create a Sidecar with the following code but I am getting java.lang.NoSuchMethodError

private val istioClient = DefaultIstioClient()

istioClient.registerCustomResource(
            SidecarBuilder()
              .withApiVersion("networking.istio.io/v1beta1")
              .withNewMetadata()
                .withName("default").withNamespace("test")
              .endMetadata()
              .withNewSpec()
                .addNewEgress()
                  .withHosts().addNewHost("./*").addNewHost("istio-system/*")
                .endEgress()
              .endSpec()
            .build()
        )

The error that I get is

java.lang.NoSuchMethodError: 'void io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.<init>(okhttp3.OkHttpClient, io.fabric8.kubernetes.client.Config, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.Boolean, java.util.List, java.lang.Object, long, io.fabric8.kubernetes.api.model.DeletionPropagation, java.lang.Boolean, long, double)'

Thanks in advance!

@enrique-fernandez-polo
Copy link
Author

I have to use kubernetes client version 5.1.0 instead of 5.3.0. Solved!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant