Razvan
06/20/2021, 1:01 PMCompanion
java.lang.NoSuchFieldError: Companion
at org.http4k.client.OkHttpKt.requestBody(OkHttp.kt:75)
at org.http4k.client.OkHttpKt.asOkHttp(OkHttp.kt:68)
at org.http4k.client.OkHttpKt.access$asOkHttp(OkHttp.kt:1)
at org.http4k.client.OkHttp$invoke$1.invoke(OkHttp.kt:38)
at org.http4k.client.OkHttp$invoke$1.invoke(OkHttp.kt:35)
It’s the basic client, nothing fancy OkHtttp()
if I replace that with JavaHttpClient() or ApacheClient() all works.
Does that ring a bel or should try to make test projects to show it ?
The error line is the if line in this function
private fun Request.requestBody() =
if (permitsRequestBody(method.toString())) body.payload.array().toRequestBody()
else null
Razvan
06/20/2021, 1:19 PMhttp4k-client-okhttp
adds okhttp 3.14.9 instead of 4.9.1 in the http4k version.dave
06/20/2021, 1:22 PMRazvan
06/20/2021, 1:38 PMapi("com.squareup.okhttp3:okhttp:4.9.1")
is not ok.
If I do it in the SpringBoot app (as implement) is OK. but I shouldn’t have to care about that as in my spring boot app I’m not using okhttp in this client app…Razvan
06/20/2021, 1:56 PM(*) - dependencies omitted (listed previously)
) but there’s nowhere else…
| +--- org.http4k:http4k-client-okhttp:4.9.8.0
| | +--- org.http4k:http4k-core:4.9.8.0 (*)
| | +--- com.squareup.okhttp3:okhttp:4.9.1 -> 3.14.9
| | | \--- com.squareup.okio:okio:1.17.2 -> 1.17.5
| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32 -> 1.5.10 (*)
| \--- com.squareup.okhttp3:okhttp:4.9.1 -> 3.14.9 (*)
dave
06/20/2021, 1:59 PMdave
06/20/2021, 2:00 PMRazvan
06/20/2021, 2:23 PMhttp4k-client-okhttp:4.9.8.0
Razvan
06/20/2021, 2:24 PMRazvan
06/20/2021, 2:28 PM