UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item #12631
Replies: 12 comments 3 replies
-
Play 2.8 does not support Java 17 out of the box, you need to upgrade guice yourself to make it work, see this guide: If you say you also tried with Play 2.9.2, did you run |
Beta Was this translation helpful? Give feedback.
-
yeah, I did try deleting the target folder and did sbt clean before compile |
Beta Was this translation helpful? Give feedback.
-
Can you post your |
Beta Was this translation helpful? Give feedback.
-
Can you please let me know what is the guice version while using paly 2.9.2? |
Beta Was this translation helpful? Give feedback.
-
When using Play 2.9.2 you do not have to add guice yourself. Just make sure you have |
Beta Was this translation helpful? Give feedback.
-
Let me know if it works, so we can close this issue, thanks! |
Beta Was this translation helpful? Give feedback.
-
So, in the logs you posted you still use Play Just add // In your build.sbt add:
libraryDependencies ++= Seq(
"com.google.inject" % "guice" % "5.1.0",
"com.google.inject.extensions" % "guice-assistedinject" % "5.1.0"
)
to your |
Beta Was this translation helpful? Give feedback.
-
I have changed it to 2.9.2, addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.16") this remains same, right? or should I change the plugin |
Beta Was this translation helpful? Give feedback.
-
I have added this //libraryDependencies += guice
libraryDependencies ++= Seq(
"com.google.inject" % "guice" % "5.1.0",
"com.google.inject.extensions" % "guice-assistedinject" % "5.1.0"
)
libraryDependencies += "net.jodah" % "typetools" % "0.6.3" Got the below error:
|
Beta Was this translation helpful? Give feedback.
-
I took your config from above's comment and made it work with Play 2.9.2. I uploaded the result in to this repo https://github.com/mkurz/playframework-12630 You can see what I changed here: mkurz/playframework-12630@ea5dcc1 This is 100% not a bug in Play but you just messed up the config. |
Beta Was this translation helpful? Give feedback.
-
We are using Play 2.8.16, sbt 1.9.6, scala 2.13.13 and jdk 17. We are able to successfully compile and run the application. We see below on the console.
--- (Running the application, auto-reloading is enabled) ---
(Server started, use Enter to stop and go back to the console...)
But once we hit http://localhost:9000/, we are getting error. UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item.
We also tried adding **JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-exports java.base/sun.security.util=ALL-UNNAMED --add-exports java.base/sun.security.x509=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED", **
but it didn't work.
Also tried with play 2.9.2, but no luck, getting the same error
Please find the below stack trace
No source available, here is the exception stack trace:
Beta Was this translation helpful? Give feedback.
All reactions