Skip to content
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

Provider io.fabric8.knative.client.KnativeExtensionAdapter not found #29096

Closed
spolti opened this issue Nov 7, 2022 · 4 comments · Fixed by #29100
Closed

Provider io.fabric8.knative.client.KnativeExtensionAdapter not found #29096

spolti opened this issue Nov 7, 2022 · 4 comments · Fixed by #29100
Labels
area/kubernetes kind/bug Something isn't working
Milestone

Comments

@spolti
Copy link
Contributor

spolti commented Nov 7, 2022

Describe the bug

Native binary fails to start when using the quarkus-kubernetes-client with knative-client.

Expected behavior

start without issues.

Actual behavior

ERROR: Failed to start application (with profile prod)
java.util.ServiceConfigurationError: io.fabric8.kubernetes.client.extension.ExtensionAdapter: Provider io.fabric8.knative.client.KnativeExtensionAdapter not found
	at java.util.ServiceLoader.fail(ServiceLoader.java:593)
	at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1219)
	at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:114)
	at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
	at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
	at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
	at io.fabric8.kubernetes.client.impl.Adapters.discoverServices(Adapters.java:106)
	at io.fabric8.kubernetes.client.impl.Adapters.<init>(Adapters.java:51)
	at io.fabric8.kubernetes.client.impl.BaseClient.<init>(BaseClient.java:102)
	at io.fabric8.kubernetes.client.impl.KubernetesClientImpl.<init>(KubernetesClientImpl.java:191)
	at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at io.fabric8.kubernetes.client.KubernetesClientBuilder.build(KubernetesClientBuilder.java:79)
	at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:98)
	at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:60)
	at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:56)
	at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:48)
	at org.kie.kogito.addons.quarkus.k8s.KubeDiscoveryConfigSourceInterceptor.<init>(KubeDiscoveryConfigSourceInterceptor.java:42)
	at org.kie.kogito.addons.quarkus.k8s.config.ServiceDiscoveryConfigBuilder.configBuilder(ServiceDiscoveryConfigBuilder.java:27)
	at io.quarkus.runtime.configuration.ConfigUtils.configBuilder(ConfigUtils.java:197)
	at io.quarkus.runtime.generated.Config.readConfig(Unknown Source)
	at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(Unknown Source)
	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:101)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:110)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:69)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:122)
	at io.quarkus.runner.GeneratedMain.main(Unknown Source)

How to Reproduce?

Reproducer:

Steps:

  1. create a new Quarkus app.
  2. make sure that the quarkus.platform.version is 2.14.0.CR1
  3. add the following dependencies:
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-kubernetes-client</artifactId>
    </dependency>
        <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>knative-client</artifactId>
    </dependency>
  1. update the GreetingResource class with some usage of the knative client, e.g.:
        knativeClient = new DefaultKnativeClient();
        knativeClient.adapt(KnativeClient.class);
  1. access the hello endpoint.

Output of uname -a or ver

OS name: "linux", version: "5.19.12-200.fc36.x86_64", arch: "amd64", family: "unix"

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.14.0.CR1

Build tool (ie. output of mvnw --version or gradlew --version)

Maven 3.8.6

Additional information

No response

@spolti spolti added the kind/bug Something isn't working label Nov 7, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 7, 2022

/cc @Sgitario, @geoand, @iocanel

@geoand
Copy link
Contributor

geoand commented Nov 7, 2022

Thanks for reporting!

#29100 should take care of it

@spolti
Copy link
Contributor Author

spolti commented Nov 7, 2022

Thanks for the quick fix @geoand.

@geoand
Copy link
Contributor

geoand commented Nov 7, 2022

YW!

@quarkus-bot quarkus-bot bot added this to the 2.15 - main milestone Nov 9, 2022
geoand added a commit that referenced this issue Nov 9, 2022
Register all implementation of ExtensionAdapter in k8s client extension
@gsmet gsmet modified the milestones: 2.15 - main, 2.14.1.Final Nov 10, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Nov 10, 2022
pedroh-pereira pushed a commit to pedroh-pereira/quarkus that referenced this issue Nov 14, 2022
@gsmet gsmet modified the milestones: 2.14.1.Final, 2.13.6.Final Dec 14, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Dec 14, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants