Skip to content

Faulty status page #1383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jchapuis opened this issue Feb 26, 2025 · 5 comments · Fixed by #1388
Closed

Faulty status page #1383

jchapuis opened this issue Feb 26, 2025 · 5 comments · Fixed by #1388

Comments

@jchapuis
Copy link

jchapuis commented Feb 26, 2025

Hey there, i'm struggling with kamon and was trying to bring up the status page but it's empty, some requests are failing

Image

Here are my dependenccies

    val kamon = "2.7.5"

  "io.kamon" %% "kamon-bundle" % Versions.kamon,
  "io.kamon" %% "kamon-datadog" % Versions.kamon,
  "io.kamon" %% "kamon-http4s-0-23" % Versions.kamon,
  "io.kamon" %% "kamon-logback" % Versions.kamon

The requests are failing with

Failed to serve request due to: 

kamon.status.page.JsonMarshalling$BaseInfoJsonMarshalling$.toJson(JsonMarshalling.scala:74)
kamon.status.page.JsonMarshalling$BaseInfoJsonMarshalling$.toJson(JsonMarshalling.scala:71)
kamon.status.page.StatusPageServer.json(StatusPageServer.scala:89)
kamon.status.page.StatusPageServer.serve(StatusPageServer.scala:46)
kamon.lib.fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
kamon.lib.fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
@jchapuis
Copy link
Author

jchapuis commented Apr 8, 2025

"java.lang.IllegalAccessError: failed to access class kamon.lib.com.grack.nanojson.JsonWriterBase from class kamon.status.page.JsonMarshalling$ModuleRegistryStatusJsonMarshalling$ (kamon.lib.com.grack.nanojson.JsonWriterBase and kamon.status.page.JsonMarshalling$ModuleRegistryStatusJsonMarshalling$ are in unnamed module of loader 'app')"

@ivantopo
Copy link
Contributor

ivantopo commented Apr 8, 2025

Hey @jchapuis, what Java/scala version are you using in that project?

@jchapuis
Copy link
Author

jchapuis commented Apr 8, 2025

Hey @jchapuis, what Java/scala version are you using in that project?

Hey Ivan! on JDK >=17 with Scala 3. I'm trying my luck with --add-opens at the moment but haven't found the workaround yet

@ivantopo
Copy link
Contributor

ivantopo commented Apr 8, 2025

Managed to reproduce this with Scala 3 only, the same versions on Scala 2.13 work as expected.

I have no idea why it happens, but just for testing I changed the rename rule so that nanojson ends up in the kamon.status.page package and it works fine like that. Weirdly enough, there were no issues with Scala 3 in the branch where I'm upgrading to the latest Kanela (see #1387) 🤷

Opened a PR with that simple workaround, will likely release it tomorrow as 2.7.6 before merging the big changes

@jchapuis
Copy link
Author

jchapuis commented Apr 9, 2025

@ivantopo great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants