-
Notifications
You must be signed in to change notification settings - Fork 1.1k
'dockerHttpClient' should be set.Falling back to Jersey #2352
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
Comments
Hello, I ran into the same warning. However I did not get the Exception. I maneged to get rid of the warning byI following the (brief) docs here on github and reached this solution: try(DockerClient dockerClient = openDockerClient()){
// your code
} And the metod then: private static DockerClient openDockerClient() {
var config = DefaultDockerClientConfig.createDefaultConfigBuilder().build();
DockerHttpClient httpClient = new ApacheDockerHttpClient.Builder()
.dockerHost(config.getDockerHost())
.sslConfig(config.getSSLConfig())
.maxConnections(100)
.connectionTimeout(Duration.ofSeconds(30))
.responseTimeout(Duration.ofSeconds(45))
.build();
return DockerClientImpl.getInstance(config, httpClient);
} you also need to add this dependency with the client to your pom.xml: <dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport-httpclient5</artifactId>
<version>3.4.0</version>
</dependency> This has removed the warning, uses the Apache HttpClient 5 and most importantly, it works. So hopefully this is the intended way. Hope it helps. |
hello,I have same error my dependency :
but when i use jdk version greater than 1.8,the above problem occurs。When I changed the jdk version to 1.8,This problem is solved. |
This solution works for me! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
在程序中出现这样的问题:
'dockerHttpClient' should be set.Falling back to Jersey, will be an error in future releases.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/ws/rs/core/Configuration
该怎么解决呢
The text was updated successfully, but these errors were encountered: