Closed garfailed closed 6 years ago
@garfailed The problem is related to some breaking change in netty2, In order to be able to work with Spring Boot 2 , just make sure you remove the following dependencies:
<dependency>
<groupId>com.commercetools.sdk.jvm.core</groupId>
<artifactId>commercetools-java-client-ahc-2_0</artifactId> .
<version>${used.version}</version>
</dependency>
<dependency>
<groupId>com.commercetools.sdk.jvm.core</groupId>
<artifactId>sdk-http-ahc-2_0</artifactId>
<version>${used.version}</version>
</dependency>
and replace it with
<dependency>
<groupId>com.commercetools.sdk.jvm.core</groupId>
<artifactId>sdk-http-apache-async</artifactId>
<version>${used.version}</version>
</dependency>
<dependency>
<groupId>com.commercetools.sdk.jvm.core</groupId>
<artifactId>commercetools-java-client-apache-async</artifactId>
<version>${used.version}</version>
</dependency>
and that's it, this client has no dependency on netty so there will be no conflict.
if that works for you let me know so i close the issue @garfailed
Thank you, that was the solution we originally used, and what was suggested by your support, but it was bugging me that I didn't know why the async-http-client
failed. I just opened this issue to let people know that there is a workaround if they prefer the async-http-client
library.
Do you have any plans to upgrade to the async-http-client
to a more recent version (2.4.5
currently)?
Updating async-http-client
should't be a big deal, i will add it to the next release.
Hi,
When we upgraded to Spring Boot 2, we ran into this error:
As it turns out both Spring Boot, and the async-http-client (at least the version present in the Commercetools SDK) use the
netty.version
property.This causes the Spring Boot property to override the async-http-client's Netty version, and since the version in Commercetools is a bit out of date it fails with the error linked above.
The workaround was to explicitly specify the older
netty.version
in our ownpom.xml
, and since nothing else uses Netty, this doesn't cause any issues (for us at least).