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

Cosmin Victor Celea

01/26/2021, 1:17 PM
Copy code
ava.lang.NoSuchMethodError: java.net.URLDecoder.decode(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String;
	at org.http4k.core.UriKt.toPathDecoded(Uri.kt:71)
	at org.http4k.contract.ContractRouteKt$extract$1$1.invoke(ContractRoute.kt:93)
	at org.http4k.contract.ContractRouteKt$extract$1$1.invoke(ContractRoute.kt)
	at org.http4k.contract.ContractRouteKt.invoke(ContractRoute.kt:88)
	at org.http4k.contract.ContractRouteKt.extract(ContractRoute.kt:93)
	at org.http4k.contract.ContractRouteKt.access$extract(ContractRoute.kt:1)
	at org.http4k.contract.ContractRoute$toRouter$1.match(ContractRoute.kt:46)
	at org.http4k.contract.ContractRoutingHttpHandler.match(ContractRoutingHttpHandler.kt:92)
	at org.http4k.routing.OrRouter.match(Router.kt:78)
	at org.http4k.routing.RouterBasedHttpHandler.match(RouterBasedHttpHandler.kt)
	at org.http4k.routing.RouterBasedHttpHandler.match(RouterBasedHttpHandler.kt)
	at org.http4k.routing.RouterBasedHttpHandler.invoke(RouterBasedHttpHandler.kt:18)
	at org.http4k.routing.RouterBasedHttpHandler.invoke(RouterBasedHttpHandler.kt:13)
	at org.http4k.filter.ServerFilters$CatchAll$invoke$1$1.invoke(ServerFilters.kt:252)
	at org.http4k.filter.ServerFilters$CatchAll$invoke$1$1.invoke(ServerFilters.kt:248)
	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.HttpUndertowHandler.handleRequest(Undertow.kt:41)
	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:1449)
	at java.lang.Thread.run(Thread.java:748)
s

s4nchez

01/26/2021, 1:19 PM
What http4k version did you have before? I haven’t run in Java 8 for ages but also think Uri is one of the least changes bits of http4k
c

Cosmin Victor Celea

01/26/2021, 1:19 PM
3.264.0
to 4.1.1.2
s

s4nchez

01/26/2021, 1:22 PM
I’m not in front of a computer at the moment but will try and take a look later.
c

Cosmin Victor Celea

01/26/2021, 1:22 PM
ok, nice, thanks.
s

s4nchez

01/26/2021, 1:22 PM
@dave have we removed the Java 8 support as part of the v4 release?
d

dave

01/26/2021, 1:23 PM
Not that I know of. When did that method call change?
s

s4nchez

01/26/2021, 1:31 PM
d

dave

01/26/2021, 1:35 PM
hmmm. It definitely wasn't a planned change, but Java 8 is very old..
s

s4nchez

01/26/2021, 1:36 PM
Yes. We’re not building or running with it so it’s likely to break again in the future
c

Cosmin Victor Celea

01/26/2021, 1:37 PM
Ok, until we can upgrade to a newer version of Java i should just stick to http4k 3.*
d

dave

01/26/2021, 1:38 PM
probably wise. v4 was just mostly about removing deprecations TBH (and announcing the toolbox etc)
c

Cosmin Victor Celea

01/26/2021, 1:39 PM
Does it make sense to make a PR that fixes this? from what i can see we could have used .decode that takes string as an argument
d

dave

01/26/2021, 1:41 PM
sure, that works. But we don't currently maintain a build against java 8 so there is no guarantee that it won't break again in the future.
c

Cosmin Victor Celea

01/26/2021, 1:42 PM
Yep, is more a temporarily solution.
14 Views