Closed alexvas closed 5 years ago
Hi, @alexvas. It looks like a configuration problem. Could you provide the feature configuration code or try explicit specify Jackson serializer?
Why was not it a configuration problem in verson 1.0.1 then? The (test) client is configured the following way:
private val httpClient = HttpClient(Apache) {
install(JsonFeature)
expectSuccess = false
engine {
followRedirects = false
connectTimeout = 10_000
socketTimeout = 10_000
connectionRequestTimeout = 20_000
customizeClient {
setDefaultIOReactorConfig(
IOReactorConfig.custom().apply {
setMaxConnPerRoute(1)
setMaxConnTotal(1)
setIoThreadCount(1)
}.build()
)
setThreadFactory(clientThreadFactory)
}
}
}
We use service loader to detect available serializer library.
It looks like we have 2 here: Jackson
(from the dependency) and kotlinx.serialization
from multiplatform ktor-client-json
(from 1.1.1).
Could you try to specify Jackson serializer explicitly?(https://ktor.io/clients/http-client/features/json-feature.html#jackson)
Probably we should move kotlinx.serialization
in the separate artifact in future.
Yes, this resolved the issue. Thank you.
Ktor Version
1.1.1
Ktor Engine Used(client or server and name)
ktor-client-apache, ktor-client-jackson
JVM Version, Operating System and Relevant Context
1.8
Feedback
Version 1.0.1 of the library works just fine. Upgrade to 1.1.1 results in the following stacktrace:
for the:
configuring builder this way: