https://kotlinlang.org logo
#http4k
Title
# http4k
r

Riku

07/09/2021, 11:41 AM
Was updating Kotlin, h4k and other deps and noticed h4k seems to have some problems with Kotlin 1.5.20 and
core.with
. No big deal for me, I am fine at 1.4.32 but I wondered if that issue was on your radar.
***** RESPONSE FAILED to GET: /api/v1/courses *****
java.lang.NullPointerException: Parameter specified as non-null is null: method org.http4k.core.HttpKt.with, parameter $this$with
at org.http4k.core.HttpKt.with(http.kt)
at org.http4k.filter.ServerFilters$Cors$invoke$1$1.invoke(ServerFilters.kt:64)
at org.http4k.filter.ServerFilters$Cors$invoke$1$1.invoke(ServerFilters.kt:50)
at org.http4k.contract.ContractRoutingHttpHandler$identify$1$1$1.invoke(ContractRoutingHttpHandler.kt:105)
at org.http4k.contract.ContractRoutingHttpHandler$identify$1$1$1.invoke(ContractRoutingHttpHandler.kt:26)
at org.http4k.core.Http4kKt$then$2.invoke(Http4k.kt:15)
at org.http4k.core.Http4kKt$then$2.invoke(Http4k.kt)
at org.http4k.routing.RouterMatch$MatchingHandler.invoke(Router.kt:47)
at org.http4k.routing.RouterMatch$MatchingHandler.invoke(Router.kt:46)
at org.http4k.routing.RouterBasedHttpHandler.invoke(RouterBasedHttpHandler.kt:23)
at org.http4k.routing.RouterBasedHttpHandler.invoke(RouterBasedHttpHandler.kt:13)
at org.http4k.filter.ServerFilters$CatchLensFailure$2$1.invoke(ServerFilters.kt:237)
at org.http4k.filter.ServerFilters$CatchLensFailure$2$1.invoke(ServerFilters.kt:45)
at fi.danceupacademy.auth.TokenAuthentication$tokenFilter$1$1.invoke(TokenAuthentication.kt:91)
at fi.danceupacademy.auth.TokenAuthentication$tokenFilter$1$1.invoke(TokenAuthentication.kt:76)
at org.http4k.filter.ServerFilters$Cors$invoke$1$1.invoke(ServerFilters.kt:55)
at org.http4k.filter.ServerFilters$Cors$invoke$1$1.invoke(ServerFilters.kt:50)
at fi.danceupacademy.DanceUpAdminKt$httoRedirectFilter$1$1.invoke(DanceUpAdmin.kt:60)
at fi.danceupacademy.DanceUpAdminKt$httoRedirectFilter$1$1.invoke(DanceUpAdmin.kt:52)
at org.http4k.filter.DebuggingFilters$PrintResponse$invoke$1$1.invoke(DebuggingFilters.kt:31)
at org.http4k.filter.DebuggingFilters$PrintResponse$invoke$1$1.invoke(DebuggingFilters.kt:27)
at org.http4k.filter.RequestFilters$Tap$invoke$1$1.invoke(RequestFilters.kt:23)
at org.http4k.filter.RequestFilters$Tap$invoke$1$1.invoke(RequestFilters.kt:19)
at org.http4k.filter.ServerFilters$InitialiseRequestContext$invoke$1$1.invoke(ServerFilters.kt:311)
at org.http4k.filter.ServerFilters$InitialiseRequestContext$invoke$1$1.invoke(ServerFilters.kt:306)
at org.http4k.core.Http4kKt$then$2.invoke(Http4k.kt:15)
at org.http4k.core.Http4kKt$then$2.invoke(Http4k.kt)
at org.http4k.filter.ServerFilters$CatchAll$invoke$1$1.invoke(ServerFilters.kt:256)
at org.http4k.filter.ServerFilters$CatchAll$invoke$1$1.invoke(ServerFilters.kt:252)
at org.http4k.core.Http4kKt$then$2.invoke(Http4k.kt:15)
at org.http4k.core.Http4kKt$then$2.invoke(Http4k.kt)
at org.http4k.server.Http4kUndertowHttpHandler.handleRequest(Http4kUndertowHttpHandler.kt:37)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:841)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1423)
at java.base/java.lang.Thread.run(Thread.java:834)
d

dave

07/09/2021, 11:56 AM
Hmmm - that's new to me - can you put a repro together @Riku ?
r

Riku

07/09/2021, 11:56 AM
sure
I did tried to do a repro and everything 👌. So must be something screwy in my project…
d

dave

07/09/2021, 1:11 PM
Obvs I don't know but could it be something with kotlin reflect clashing between 1.4.32 and 1.5.x? Multiple versions of that jar on the CP have caused problems in the past...
r

Riku

07/09/2021, 1:38 PM
yeah I realized while out jogging the same, that kotlin reflect is out of sync and maybe that is it. Must try when I am back at my machine
38 Views