Getting "XmlRootElement cannot be resolved to a type" error after upgrading GWT from 2.8.1 to 2.8.2

You need to add a dependency on that jar now, it is no longer part of GWT (and probably shouldn't have been to begin with, which is why it is gone):

Maven:

<dependency>
  <groupId>javax.xml.bind</groupId>
  <artifactId>jaxb-api</artifactId>
  <version>2.3.0</version>
  <classifier>sources</classifier>
  <scope>provided</scope>
</dependency>

Gradle:

gwt 'javax.xml.bind:jaxb-api:2.3.0'

EDIT: Correction, it looks like this might not be just related to updating GWT, but specific to Java 9 - no longer are these classes included in JDK 9, so you must actually have a dependency on the jaxb-api in your project.

Tags:

Java

Gwt