Play Framework - dev server shutting down after refreshing
Asked Answered
S

1

9

My problem is that every time I run sbt run, the server works until I refresh the page. After that, I get this in my terminal

Uncaught error from thread [play-dev-mode-akka.actor.default-dispatcher-3]: javax/xml/bind/DatatypeConverter, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for for ActorSystem[play-dev-mode]
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

Since there's not much ressources about play and scala on the web, I really need guidance for this.

Shade answered 27/9, 2017 at 14:16 Comment(5)
This is a Java thing. Start googling for "java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter".Schmid
Have you already switched to JDK9? java.xml.bind module is not resolved by default if you are using new module feature. If you need JAXB either revert back to JDK8 or run with --add-modules java.xml.bind or else deploy JAXB on the class pathCytokinesis
Thanks I made it work. Can you post this as an answer so I can accept it ?Shade
How did you make it work? I'm having the same issue, I've added to build.sbt javaOptions in Universal ++= "--add-modules=java.xml.bind" and it compiles, but doesn't run.Aquifer
I've posted an answerShade
S
12

I resolved my issue with libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.1" in my build.sbt

@Bask.ws was actually right, I needed JAXB.

You can checkout the Maven repository

Shade answered 9/10, 2017 at 13:2 Comment(1)
thank you so much for this answer. I was using the play framework 2.6 starter project.Rasheedarasher

© 2022 - 2024 — McMap. All rights reserved.