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.kubernetes.client.okhttp.OkHttpClientFactory not found #1252

Open
liborfuka opened this issue Oct 17, 2023 · 7 comments
Open

Comments

@liborfuka
Copy link

Using dekorate-bom 3.6.1 and runing mvn clean package -Ddekorate.deploy=true raise exception:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project springboot-dekorate-app: Fatal error compiling: java.util.ServiceConfigurationError: io.fabric8.kubernetes.client.http.HttpClient$Factory: Provider io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory not found -> [Help 1]

@iocanel
Copy link
Member

iocanel commented Oct 17, 2023

@liborfuka: With the provided input I am unable to reproduce the issue.

More specifically I used the spring-boot-on-kubernetes-example and added the dekorate and spring boms:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.dekorate</groupId>
        <artifactId>dekorate-bom</artifactId>
        <version>3.6.1</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>3.1.4</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

@iocanel
Copy link
Member

iocanel commented Oct 17, 2023

The error message itself most probably means that https://github.com/fabric8io/kubernetes-client/blob/main/httpclient-okhttp/pom.xml is not present in your class path.

The dependency should be brought in by io.fabric8:kubernetes-client:6.6.2 which is used by dekorate-core.
Check that a bom is not somehow forcing different version or add the dependency explicitly to your project if it does.

@liborfuka
Copy link
Author

liborfuka commented Oct 18, 2023

I have parent BOM which brings org.springframework.cloud.spring-cloud-starter-kubernetes-fabric8 3.0.4 and it brings fabric8.kubernetes-client 6.2.0 but this should be ok.

@liborfuka
Copy link
Author

I tested the same application with dekorate-spring-bom 2.11.5.redhat-00017 and it does not raise the exception Provider io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory not found.
It raises the exception with dekorate-spring-bom 3.6.1.

@liborfuka
Copy link
Author

liborfuka commented Oct 18, 2023

They changed it in kubernetes-client pom: https://github.com/fabric8io/kubernetes-client/blob/v6.6.2/kubernetes-client/pom.xml.

<dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>kubernetes-httpclient-okhttp</artifactId>
      <scope>runtime</scope>
 </dependency>

It is scope runtime now.

@liborfuka
Copy link
Author

Fixed in 3.7.6

@liborfuka
Copy link
Author

liborfuka commented Dec 13, 2023

This issue is back from 4.0.0 tag.

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

No branches or pull requests

2 participants