Play 2.7.0 Implementation of JAXB-API has not been found on module path or classpath

I just upgraded and I get that on startup

CreationException: Unable to create injector, see the following errors:

1) Error in custom provider, java.lang.RuntimeException: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
 - with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
  while locating play.api.db.evolutions.ApplicationEvolutionsProvider
  at play.api.db.evolutions.EvolutionsModule.<init>(EvolutionsModule.scala:21):
Binding(class play.api.db.evolutions.ApplicationEvolutions to ProviderConstructionTarget(class play.api.db.evolutions.ApplicationEvolutionsProvider) eagerly) (via modules:$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$4)
  while locating play.api.db.evolutions.ApplicationEvolutions

I didn’t find something related to that in the migration guide. I am missing something?

Btw I have play.evolutions.enabled=false and I don’t have evolutions in my dependencies

I have the same error with the starter project

I guess it comes from the EBean update.

java -version

java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

I fixed the problem by adding these two dependencies
“org.glassfish.jaxb” % “jaxb-core” % “”
“org.glassfish.jaxb” % “jaxb-runtime” % “2.3.2”

1 Like

It is possible that the dependency to evolutions is being added transitively. If you are using play-ebean, for example, it brings Play evolutions.