Repository: rest-assured/rest-assured
Pull request #1523 (2021-12-08 23:34:12)

groovy 3.0.9


Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0dfd449a..c446bb03 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,7 +9,7 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-18.04]
-        java: [8, 11, 12, 13, 14, 15, 16]
+        java: [8, 11, 14]
       fail-fast: false
       max-parallel: 4
     name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
diff --git a/README.md b/README.md
index da771d80..480368e2 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 ![REST Assured](rest-assured-logo-green.png)
 
-[![Build Status](https://travis-ci.com/rest-assured/rest-assured.svg?branch=master)](https://travis-ci.com/rest-assured/rest-assured)
+[![Build Status](https://github.com/rest-assured/rest-assured/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/rest-assured/rest-assured/actions/workflows/ci.yml)
 [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.rest-assured/rest-assured/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.rest-assured/rest-assured)
 [![Javadoc](https://javadoc-badge.appspot.com/io.rest-assured/rest-assured.svg)](http://www.javadoc.io/doc/io.rest-assured/rest-assured)
 
diff --git a/changelog.txt b/changelog.txt
index becb7fd5..dcf400f3 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,8 @@
+Changelog next version
+----------------------
+* JAXB is now an optional dependency for XmlPath and is now longer required. Depend on 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.3' and 'com.sun.xml.bind:jaxb-impl:2.3.3'
+* Implemented support for serializing and deserializing with Jakarta EE 8 and 9. To use it you need to have Jakarta EE on the classpath, for example by depending on 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1' and 'org.glassfish.jaxb:jaxb-runtime:3.0.2'.
+
 Changelog 4.4.0 (2021-05-21)
 ----------------------------
 * Upgrading kotlin extension module to use Kotlin 1.5.0 (previously 1.4.21 was used)
diff --git a/examples/spring-mvc-webapp/pom.xml b/examples/spring-mvc-webapp/pom.xml
index 1dc4e881..baf4ba7d 100644
--- a/examples/spring-mvc-webapp/pom.xml
+++ b/examples/spring-mvc-webapp/pom.xml
@@ -86,6 +86,28 @@
             <version>${jetty.version}</version>
             <scope>test</scope>
         </dependency>
+        <!-- Jakarta EE 8 -->
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!-- Jakarta EE 9 -->
+        <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jaxb</groupId>
+            <artifactId>jaxb-runtime</artifactId>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>javax.servlet</groupId>
diff --git a/pom.xml b/pom.xml
index 02f8ce1f..176c29fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
     <inceptionYear>2010</inceptionYear>
     <issueManagement>
         <system>GitHub Issue Tracking</system>
-        <url />
+        <url/>
     </issueManagement>
     <licenses>
         <license>
@@ -57,7 +57,7 @@
     <properties>
         <scm.branch>master</scm.branch>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <groovy.version>3.0.8</groovy.version>
+        <groovy.version>3.0.9</groovy.version>
         <groovy.range>[3.0,3.1)</groovy.range>
         <gmaven.version>1.5</gmaven.version>
         <hamcrest.version>2.1</hamcrest.version>
@@ -123,7 +123,7 @@
                     <version>${gmaven.version}</version>
                     <configuration>
                         <providerSelection>2.0</providerSelection>
-                        <source />
+                        <source/>
                     </configuration>
                     <dependencies>
                         <dependency>
@@ -188,6 +188,10 @@
                             <!-- Jigsaw project (Java 9) and later module-info classes. -->
                             <ignoredClassPattern>.*\.module-info$</ignoredClassPattern>
                             <ignoredClassPattern>javax\.activation.*</ignoredClassPattern>
+                            <!-- Some classes that are duplicated in the (optional) JAXB / Jakarta EE dependencies. -->
+                            <ignoredClassPattern>com\.sun\.istack.*</ignoredClassPattern>
+                            <ignoredClassPattern>com\.sun\.xml.*</ignoredClassPattern>
+                            <ignoredClassPattern>META-INF\.versions\.9\.com\.sun\.istack\.logging.*</ignoredClassPattern>
                             <!-- Spring AOP -->
                             <ignoredClassPattern>org\.aopalliance.*</ignoredClassPattern>
                             <!-- OSGi -->
@@ -330,22 +334,27 @@
                 <artifactId>tagsoup</artifactId>
                 <version>1.2.1</version>
             </dependency>
+            <!-- Backward compatibility with JAXB (Jakarta EE 8?) -->
             <dependency>
-                <groupId>jakarta.xml.bind</groupId>
-                <artifactId>jakarta.xml.bind-api</artifactId>
-                <version>2.3.3</version>
+                <groupId>javax.xml.bind</groupId>
+                <artifactId>jaxb-api</artifactId>
+                <version>2.3.1</version>
             </dependency>
             <dependency>
                 <groupId>com.sun.xml.bind</groupId>
                 <artifactId>jaxb-impl</artifactId>
-                <version>2.3.3</version>
-                <exclusions>
-                    <exclusion>
-                        <!-- jakarta.xml.bind-api already brings in jakarta.activation:jakarta.activation-api -->
-                        <groupId>com.sun.activation</groupId>
-                        <artifactId>jakarta.activation</artifactId>
-                    </exclusion>
-                </exclusions>
+                <version>2.3.4</version>
+            </dependency>
+            <!-- Jakarta EE 9 -->
+            <dependency>
+                <groupId>jakarta.xml.bind</groupId>
+                <artifactId>jakarta.xml.bind-api</artifactId>
+                <version>3.0.1</version>
+            </dependency>
+            <dependency>
+                <groupId>org.glassfish.jaxb</groupId>
+                <artifactId>jaxb-runtime</artifactId>
+                <version>3.0.2</version>
             </dependency>
             <dependency>
                 <groupId>junit</groupId>
diff --git a/rest-assured-common/src/main/java/io/restassured/common/mapper/resolver/ObjectMapperResolver.java b/rest-assured-common/src/main/java/io/restassured/common/mapper/resolver/ObjectMapperResolver.java
index 9576e7b6..2e5305e9 100644
--- a/rest-assured-common/src/main/java/io/restassured/common/mapper/resolver/ObjectMapperResolver.java
+++ b/rest-assured-common/src/main/java/io/restassured/common/mapper/resolver/ObjectMapperResolver.java
@@ -22,6 +22,7 @@ public class ObjectMapperResolver {
     private static final boolean isJackson1Present = existInCP("org.codehaus.jackson.map.ObjectMapper") && existInCP("org.codehaus.jackson.JsonGenerator");
     private static final boolean isJackson2Present = existInCP("com.fasterxml.jackson.databind.ObjectMapper") && existInCP("com.fasterxml.jackson.core.JsonGenerator");
     private static final boolean isJaxbPresent = existInCP("javax.xml.bind.Binder");
+    private static final boolean isJakartaEEPresent = existInCP("jakarta.xml.bind.Binder");
     private static final boolean isGsonPresent = existInCP("com.google.gson.Gson");
     private static final boolean isJohnzonPresent = existInCP("org.apache.johnzon.mapper.Mapper");
     private static final boolean isYassonPresent = existInCP("org.eclipse.yasson.JsonBindingProvider");
@@ -38,6 +39,10 @@ public class ObjectMapperResolver {
         return isJaxbPresent;
     }
 
+    public static boolean isJakartaEEInClassPath() {
+        return isJakartaEEPresent;
+    }
+
     public static boolean isGsonInClassPath() {
         return isGsonPresent;
     }
diff --git a/rest-assured/pom.xml b/rest-assured/pom.xml
index 28d9f0c5..d7bc2d31 100644
--- a/rest-assured/pom.xml
+++ b/rest-assured/pom.xml
@@ -91,7 +91,25 @@
             <artifactId>httpmime</artifactId>
             <version>${httpclient.version}</version>
         </dependency>
-        
+
+        <!-- Jakarta EE 8 -->
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- Jakarta EE 9 -->
+        <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jaxb</groupId>
+            <artifactId>jaxb-runtime</artifactId>
+            <optional>true</optional>
+        </dependency>
+
         <dependency>
             <groupId>com.github.scribejava</groupId>
             <artifactId>scribejava-apis</artifactId>
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/mapping/GsonMapper.groovy b/rest-assured/src/main/groovy/io/restassured/internal/mapping/GsonMapper.groovy
index 3a563e04..f4f15b39 100644
--- a/rest-assured/src/main/groovy/io/restassured/internal/mapping/GsonMapper.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/GsonMapper.groovy
@@ -26,21 +26,21 @@ import io.restassured.path.json.mapping.JsonPathObjectDeserializer
 
 class GsonMapper implements ObjectMapper {
 
-    private GsonObjectMapperFactory factory;
+    private GsonObjectMapperFactory factory
 
     private JsonPathObjectDeserializer deserializer
 
-    public GsonMapper(GsonObjectMapperFactory factory) {
+    GsonMapper(GsonObjectMapperFactory factory) {
         this.factory = factory
         deserializer = new JsonPathGsonObjectDeserializer(factory)
     }
 
-    def Object deserialize(ObjectMapperDeserializationContext context) {
-        return deserializer.deserialize(context);
+    Object deserialize(ObjectMapperDeserializationContext context) {
+        return deserializer.deserialize(context)
     }
 
-    def Object serialize(ObjectMapperSerializationContext context) {
-        def object = context.getObjectToSerialize();
+    Object serialize(ObjectMapperSerializationContext context) {
+        def object = context.getObjectToSerialize()
         def gson = factory.create(object.getClass(), context.getCharset())
         return gson.toJson(object)
     }
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/mapping/Jackson1Mapper.groovy b/rest-assured/src/main/groovy/io/restassured/internal/mapping/Jackson1Mapper.groovy
index b1d61f67..dc0099f7 100644
--- a/rest-assured/src/main/groovy/io/restassured/internal/mapping/Jackson1Mapper.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/Jackson1Mapper.groovy
@@ -28,7 +28,7 @@ import org.codehaus.jackson.JsonGenerator
 
 class Jackson1Mapper implements ObjectMapper {
 
-    private final Jackson1ObjectMapperFactory factory;
+    private final Jackson1ObjectMapperFactory factory
 
     private JsonPathObjectDeserializer deserializer
 
@@ -41,7 +41,7 @@ class Jackson1Mapper implements ObjectMapper {
         return factory.create(cls, charset)
     }
 
-    def String serialize(ObjectMapperSerializationContext context) {
+    String serialize(ObjectMapperSerializationContext context) {
         def object = context.getObjectToSerialize()
         JsonEncoding jsonEncoding = getEncoding(context.getCharset())
         def mapper = createJacksonObjectMapper(object.getClass(), context.getCharset())
@@ -51,7 +51,7 @@ class Jackson1Mapper implements ObjectMapper {
         return stream.toString(jsonEncoding.getJavaName())
     }
 
-    def Object deserialize(ObjectMapperDeserializationContext context) {
+    Object deserialize(ObjectMapperDeserializationContext context) {
         return deserializer.deserialize(context)
     }
 
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/mapping/Jackson2Mapper.groovy b/rest-assured/src/main/groovy/io/restassured/internal/mapping/Jackson2Mapper.groovy
index 0ca4d192..7d498f26 100644
--- a/rest-assured/src/main/groovy/io/restassured/internal/mapping/Jackson2Mapper.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/Jackson2Mapper.groovy
@@ -31,7 +31,7 @@ import io.restassured.path.json.mapping.JsonPathObjectDeserializer
  */
 class Jackson2Mapper implements ObjectMapper {
 
-  private final Jackson2ObjectMapperFactory factory;
+  private final Jackson2ObjectMapperFactory factory
 
   private JsonPathObjectDeserializer deserializer
 
@@ -44,7 +44,7 @@ class Jackson2Mapper implements ObjectMapper {
     return factory.create(cls, charset)
   }
 
-  def String serialize(ObjectMapperSerializationContext context) {
+  String serialize(ObjectMapperSerializationContext context) {
     def object = context.getObjectToSerialize()
     JsonEncoding jsonEncoding = getEncoding(context.getCharset())
     def mapper = createJackson2ObjectMapper(object.getClass(), context.getCharset())
@@ -54,8 +54,8 @@ class Jackson2Mapper implements ObjectMapper {
     stream.toString(jsonEncoding.getJavaName())
   }
 
-  def Object deserialize(ObjectMapperDeserializationContext context) {
-    return deserializer.deserialize(context);
+  Object deserialize(ObjectMapperDeserializationContext context) {
+    return deserializer.deserialize(context)
   }
 
   private JsonEncoding getEncoding(String charset) {
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/mapping/JakartaEEMapper.groovy b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JakartaEEMapper.groovy
new file mode 100644
index 00000000..11ece4cd
--- /dev/null
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JakartaEEMapper.groovy
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.restassured.internal.mapping
+
+import io.restassured.internal.path.xml.mapping.XmlPathJakartaEEObjectDeserializer
+import io.restassured.internal.path.xml.mapping.XmlPathJaxbObjectDeserializer
+import io.restassured.mapper.ObjectMapper
+import io.restassured.mapper.ObjectMapperDeserializationContext
+import io.restassured.mapper.ObjectMapperSerializationContext
+import io.restassured.path.xml.mapper.factory.JakartaEEObjectMapperFactory
+import io.restassured.path.xml.mapping.XmlPathObjectDeserializer
+
+class JakartaEEMapper implements ObjectMapper {
+
+    private final JakartaEEObjectMapperFactory factory
+
+    private XmlPathObjectDeserializer deserializer
+
+  JakartaEEMapper(JakartaEEObjectMapperFactory factory) {
+        this.factory = factory
+        deserializer = new XmlPathJakartaEEObjectDeserializer(factory)
+    }
+
+    Object deserialize(ObjectMapperDeserializationContext context) {
+        deserializer.deserialize(context)
+    }
+
+    @SuppressWarnings('UnnecessaryQualifiedReference')
+    Object serialize(ObjectMapperSerializationContext context) {
+        def object = context.getObjectToSerialize()
+        def charset = context.getCharset()
+        jakarta.xml.bind.JAXBContext jaxbContext = factory.create(object.getClass(), charset)
+        jakarta.xml.bind.Marshaller marshaller = jaxbContext.createMarshaller()
+        if (charset != null) {
+            marshaller.setProperty(jakarta.xml.bind.Marshaller.JAXB_ENCODING, charset)
+        }
+        StringWriter sw = new StringWriter()
+        marshaller.marshal(object, sw)
+        return sw.toString()
+    }
+}
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/mapping/JaxbMapper.groovy b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JaxbMapper.groovy
index c30d6ab9..16a3857f 100644
--- a/rest-assured/src/main/groovy/io/restassured/internal/mapping/JaxbMapper.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JaxbMapper.groovy
@@ -22,31 +22,29 @@ import io.restassured.mapper.ObjectMapperSerializationContext
 import io.restassured.path.xml.mapper.factory.JAXBObjectMapperFactory
 import io.restassured.path.xml.mapping.XmlPathObjectDeserializer
 
-import javax.xml.bind.JAXBContext
-import javax.xml.bind.Marshaller
-
 class JaxbMapper implements ObjectMapper {
 
-    private final JAXBObjectMapperFactory factory;
+    private final JAXBObjectMapperFactory factory
 
     private XmlPathObjectDeserializer deserializer
 
-    public JaxbMapper(JAXBObjectMapperFactory factory) {
+    JaxbMapper(JAXBObjectMapperFactory factory) {
         this.factory = factory
         deserializer = new XmlPathJaxbObjectDeserializer(factory)
     }
 
-    def Object deserialize(ObjectMapperDeserializationContext context) {
+    Object deserialize(ObjectMapperDeserializationContext context) {
         deserializer.deserialize(context)
     }
 
-    def Object serialize(ObjectMapperSerializationContext context) {
-        def object = context.getObjectToSerialize();
+    @SuppressWarnings('UnnecessaryQualifiedReference')
+    Object serialize(ObjectMapperSerializationContext context) {
+        def object = context.getObjectToSerialize()
         def charset = context.getCharset()
-        JAXBContext jaxbContext = factory.create(object.getClass(), charset)
-        Marshaller marshaller = jaxbContext.createMarshaller()
+        javax.xml.bind.JAXBContext jaxbContext = factory.create(object.getClass(), charset)
+        javax.xml.bind.Marshaller marshaller = jaxbContext.createMarshaller()
         if (charset != null) {
-            marshaller.setProperty(Marshaller.JAXB_ENCODING, charset)
+            marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_ENCODING, charset)
         }
         StringWriter sw = new StringWriter()
         marshaller.marshal(object, sw)
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/mapping/JohnzonMapper.groovy b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JohnzonMapper.groovy
index cd0b8e4c..9eca3fbb 100644
--- a/rest-assured/src/main/groovy/io/restassured/internal/mapping/JohnzonMapper.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JohnzonMapper.groovy
@@ -23,26 +23,26 @@ import io.restassured.path.json.mapper.factory.JohnzonObjectMapperFactory
 import io.restassured.path.json.mapping.JsonPathObjectDeserializer
 
 class JohnzonMapper implements ObjectMapper {
-	private JohnzonObjectMapperFactory factory;
+	private JohnzonObjectMapperFactory factory
 	
 	private JsonPathObjectDeserializer deserializer
 
-	public JohnzonMapper(JohnzonObjectMapperFactory factory) {
+	JohnzonMapper(JohnzonObjectMapperFactory factory) {
 		this.factory = factory
 		deserializer = new JsonPathJohnzonObjectDeserializer(factory)
 	}
 
-	def Object deserialize(ObjectMapperDeserializationContext context) {
-		return deserializer.deserialize(context);
+	Object deserialize(ObjectMapperDeserializationContext context) {
+		return deserializer.deserialize(context)
 	}
 
-	def Object serialize(ObjectMapperSerializationContext context) {
-		def object = context.getObjectToSerialize();
+	Object serialize(ObjectMapperSerializationContext context) {
+		def object = context.getObjectToSerialize()
 		def mapper = factory.create(object.getClass(), context.getCharset())
 		
 		new StringWriter().withWriter { out ->
 			mapper.writeObject(context.getObjectToSerialize(), out)
-			out.toString();
+			out.toString()
 		}
 	}
 
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/mapping/JsonbMapper.groovy b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JsonbMapper.groovy
index 8546e467..bc6bbe17 100644
--- a/rest-assured/src/main/groovy/io/restassured/internal/mapping/JsonbMapper.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JsonbMapper.groovy
@@ -23,21 +23,21 @@ import io.restassured.path.json.mapper.factory.JsonbObjectMapperFactory
 import io.restassured.path.json.mapping.JsonPathObjectDeserializer
 
 class JsonbMapper implements ObjectMapper {
-	private JsonbObjectMapperFactory factory;
+	private JsonbObjectMapperFactory factory
 
-	private JsonPathObjectDeserializer deserializer;
+	private JsonPathObjectDeserializer deserializer
 
-	public JsonbMapper(JsonbObjectMapperFactory factory) {
-		this.factory = factory;
+	JsonbMapper(JsonbObjectMapperFactory factory) {
+		this.factory = factory
 		deserializer = new JsonPathJsonbObjectDeserializer(factory)
 	}
 
-	def Object deserialize(ObjectMapperDeserializationContext context) {
-		return deserializer.deserialize(context);
+	Object deserialize(ObjectMapperDeserializationContext context) {
+		return deserializer.deserialize(context)
 	}
 
-	def Object serialize(ObjectMapperSerializationContext context) {
-		def object = context.getObjectToSerialize();
+	Object serialize(ObjectMapperSerializationContext context) {
+		def object = context.getObjectToSerialize()
 		def mapper = factory.create(object.getClass(), context.getCharset())
 
 		new StringWriter().withWriter { out ->
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/mapping/ObjectMapping.groovy b/rest-assured/src/main/groovy/io/restassured/internal/mapping/ObjectMapping.groovy
index 864d86b4..3d921086 100644
--- a/rest-assured/src/main/groovy/io/restassured/internal/mapping/ObjectMapping.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/ObjectMapping.groovy
@@ -31,6 +31,7 @@ import io.restassured.path.json.mapper.factory.Jackson2ObjectMapperFactory
 import io.restassured.path.json.mapper.factory.JohnzonObjectMapperFactory
 import io.restassured.path.json.mapper.factory.JsonbObjectMapperFactory
 import io.restassured.path.xml.mapper.factory.JAXBObjectMapperFactory
+import io.restassured.path.xml.mapper.factory.JakartaEEObjectMapperFactory
 import io.restassured.response.ResponseBodyData
 import org.apache.commons.lang3.Validate
 
@@ -68,7 +69,9 @@ class ObjectMapping {
       }
       throw new IllegalStateException("Cannot parse object because no JSON deserializer found in classpath. Please put either Jackson (Databind) or Gson in the classpath.")
     } else if (containsIgnoreCase(contentType, "xml")) {
-      if (isJAXBInClassPath()) {
+      if (isJakartaEEInClassPath()) {
+        return parseWithJakartaEE(deserializationCtx, objectMapperConfig.jakartaEEObjectMapperFactory()) as T
+      } else if  (isJAXBInClassPath()) {
         return parseWithJaxb(deserializationCtx, objectMapperConfig.jaxbObjectMapperFactory()) as T
       }
       throw new IllegalStateException("Cannot parse object because no XML deserializer found in classpath. Please put a JAXB compliant object mapper in classpath.")
@@ -86,7 +89,9 @@ class ObjectMapping {
 		  return parseWithJsonb(deserializationCtx, objectMapperConfig.jsonbObjectMapperFactory()) as T
         }
       } else if (containsIgnoreCase(defaultContentType, "xml")) {
-        if (isJAXBInClassPath()) {
+        if (isJakartaEEInClassPath()) {
+          return parseWithJakartaEE(deserializationCtx, objectMapperConfig.jakartaEEObjectMapperFactory()) as T
+        } else if (isJAXBInClassPath()) {
           return parseWithJaxb(deserializationCtx, objectMapperConfig.jaxbObjectMapperFactory()) as T
         }
       }
@@ -94,14 +99,15 @@ class ObjectMapping {
     throw new IllegalStateException(String.format("Cannot parse object because no supported Content-Type was specified in response. Content-Type was '%s'.", contentType))
   }
 
-  private
-  static <T> T deserializeWithObjectMapper(ObjectMapperDeserializationContext ctx, ObjectMapperType mapperType, ObjectMapperConfig config) {
+  private static <T> T deserializeWithObjectMapper(ObjectMapperDeserializationContext ctx, ObjectMapperType mapperType, ObjectMapperConfig config) {
     if (mapperType == ObjectMapperType.JACKSON_2 && isJackson2InClassPath()) {
       return parseWithJackson2(ctx, config.jackson2ObjectMapperFactory()) as T
     } else if (mapperType == ObjectMapperType.JACKSON_1 && isJackson1InClassPath()) {
       return parseWithJackson1(ctx, config.jackson1ObjectMapperFactory()) as T
     } else if (mapperType == ObjectMapperType.GSON && isGsonInClassPath()) {
       return parseWithGson(ctx, config.gsonObjectMapperFactory()) as T
+    } else if (mapperType == ObjectMapperType.JAKARTA_EE && isJakartaEEInClassPath()) {
+      return parseWithJakartaEE(ctx, config.jakartaEEObjectMapperFactory()) as T
     } else if (mapperType == ObjectMapperType.JAXB && isJAXBInClassPath()) {
       return parseWithJaxb(ctx, config.jaxbObjectMapperFactory()) as T
     } else if (mapperType == ObjectMapperType.JOHNZON && isJohnzonInClassPath()) {
@@ -114,7 +120,7 @@ class ObjectMapping {
     }
   }
 
-  public static String serialize(Object object, String contentType, String charset, ObjectMapperType mapperType, ObjectMapperConfig config,
+  static String serialize(Object object, String contentType, String charset, ObjectMapperType mapperType, ObjectMapperConfig config,
                                  EncoderConfig encoderConfig) {
     notNull(object, "String to serialize")
     notNull(config, "Object mapper configuration not found, cannot serialize object.")
@@ -135,6 +141,8 @@ class ObjectMapping {
         return serializeWithJackson1(serializationCtx, config.jackson1ObjectMapperFactory())
       } else if (isGsonInClassPath()) {
         return serializeWithGson(serializationCtx, config.gsonObjectMapperFactory())
+      } else if (isJakartaEEInClassPath()) {
+        return serializeWithJakartaEE(serializationCtx, config.jakartaEEObjectMapperFactory())
       } else if (isJAXBInClassPath()) {
         return serializeWithJaxb(serializationCtx, config.jaxbObjectMapperFactory())
       } else if (isJohnzonInClassPath()) {
@@ -159,10 +167,12 @@ class ObjectMapping {
         }
         throw new IllegalStateException("Cannot serialize object because no JSON serializer found in classpath. Please put Jackson (Databind), Gson, Johnzon, or Yasson in the classpath.")
       } else if (containsIgnoreCase(ct, "xml") || encoderConfig.contentEncoders().get(ContentTypeExtractor.getContentTypeWithoutCharset(ct)) == ContentType.XML) {
-        if (isJAXBInClassPath()) {
+        if (isJakartaEEInClassPath()) {
+          return serializeWithJakartaEE(serializationCtx, config.jakartaEEObjectMapperFactory())
+        } else if (isJAXBInClassPath()) {
           return serializeWithJaxb(serializationCtx, config.jaxbObjectMapperFactory())
         } else {
-          throw new IllegalStateException("Cannot serialize object because no XML serializer found in classpath. Please put a JAXB compliant object mapper in classpath.")
+          throw new IllegalStateException("Cannot serialize object because no XML serializer found in classpath. Please put a JAXB or JakartaEE compliant object mapper in classpath.")
         }
       } else {
         def errorMessage = "Cannot serialize because cannot determine how to serialize content-type $contentType"
@@ -185,6 +195,8 @@ class ObjectMapping {
       return serializeWithJackson1(ctx, config.jackson1ObjectMapperFactory())
     } else if (mapperType == ObjectMapperType.GSON && isGsonInClassPath()) {
       return serializeWithGson(ctx, config.gsonObjectMapperFactory())
+    } else if (mapperType == ObjectMapperType.JAKARTA_EE && isJakartaEEInClassPath()) {
+      return serializeWithJakartaEE(ctx, config.jakartaEEObjectMapperFactory())
     } else if (mapperType == ObjectMapperType.JAXB && isJAXBInClassPath()) {
       return serializeWithJaxb(ctx, config.jaxbObjectMapperFactory())
     } else if (mapperType == ObjectMapperType.JOHNZON && isJohnzonInClassPath()) {
@@ -214,6 +226,10 @@ class ObjectMapping {
     new JaxbMapper(factory).serialize(ctx)
   }
 
+  private static String serializeWithJakartaEE(ObjectMapperSerializationContext ctx, JakartaEEObjectMapperFactory factory) {
+    new JakartaEEMapper(factory).serialize(ctx)
+  }
+
   private static String serializeWithJohnzon(ObjectMapperSerializationContext ctx, JohnzonObjectMapperFactory factory) {
     new JohnzonMapper(factory).serialize(ctx)
   }
@@ -226,6 +242,10 @@ class ObjectMapping {
     new JaxbMapper(factory).deserialize(ctx)
   }
 
+  private static def parseWithJakartaEE(ObjectMapperDeserializationContext ctx, JakartaEEObjectMapperFactory factory) {
+    new JakartaEEMapper(factory).deserialize(ctx)
+  }
+
   private static def parseWithGson(ObjectMapperDeserializationContext ctx, GsonObjectMapperFactory factory) {
     new GsonMapper(factory).deserialize(ctx)
   }
diff --git a/rest-assured/src/main/java/io/restassured/config/ObjectMapperConfig.java b/rest-assured/src/main/java/io/restassured/config/ObjectMapperConfig.java
index 8735b026..15ef0d86 100644
--- a/rest-assured/src/main/java/io/restassured/config/ObjectMapperConfig.java
+++ b/rest-assured/src/main/java/io/restassured/config/ObjectMapperConfig.java
@@ -16,11 +16,14 @@
 
 package io.restassured.config;
 
+import io.restassured.common.mapper.resolver.ObjectMapperResolver;
 import io.restassured.mapper.ObjectMapper;
 import io.restassured.mapper.ObjectMapperType;
 import io.restassured.path.json.mapper.factory.*;
 import io.restassured.path.xml.mapper.factory.DefaultJAXBObjectMapperFactory;
+import io.restassured.path.xml.mapper.factory.DefaultJakartaEEObjectMapperFactory;
 import io.restassured.path.xml.mapper.factory.JAXBObjectMapperFactory;
+import io.restassured.path.xml.mapper.factory.JakartaEEObjectMapperFactory;
 import org.apache.commons.lang3.Validate;
 
 /**
@@ -36,6 +39,7 @@ public class ObjectMapperConfig implements Config {
     private final JAXBObjectMapperFactory jaxbObjectMapperFactory;
     private final JohnzonObjectMapperFactory johnzonObjectMapperFactory;
     private final JsonbObjectMapperFactory jsonbObjectMapperFactory;
+    private final JakartaEEObjectMapperFactory jakartaEEObjectMapperFactory;
     private final boolean isUserConfigured;
 
     /**
@@ -50,9 +54,10 @@ public class ObjectMapperConfig implements Config {
         gsonObjectMapperFactory = new DefaultGsonObjectMapperFactory();
         jackson1ObjectMapperFactory = new DefaultJackson1ObjectMapperFactory();
         jackson2ObjectMapperFactory = new DefaultJackson2ObjectMapperFactory();
-        jaxbObjectMapperFactory = new DefaultJAXBObjectMapperFactory();
+        jaxbObjectMapperFactory = newJaxbObjectMapperFactoryOrNullIfNotInClasspath();
         johnzonObjectMapperFactory = new DefaultJohnzonObjectMapperFactory();
         jsonbObjectMapperFactory = new DefaultYassonObjectMapperFactory();
+        jakartaEEObjectMapperFactory = newJakartaEEObjectMapperFactoryOrNullIfNotInClasspath();
         isUserConfigured = false;
     }
 
@@ -63,8 +68,9 @@ public class ObjectMapperConfig implements Config {
      */
     public ObjectMapperConfig(ObjectMapperType defaultObjectMapperType) {
         this(null, defaultObjectMapperType, new DefaultGsonObjectMapperFactory(), new DefaultJackson1ObjectMapperFactory(),
-                new DefaultJackson2ObjectMapperFactory(), new DefaultJAXBObjectMapperFactory(), 
-                    new DefaultJohnzonObjectMapperFactory(), new DefaultYassonObjectMapperFactory(), true);
+                new DefaultJackson2ObjectMapperFactory(), newJaxbObjectMapperFactoryOrNullIfNotInClasspath(),
+                new DefaultJohnzonObjectMapperFactory(), new DefaultYassonObjectMapperFactory(), newJakartaEEObjectMapperFactoryOrNullIfNotInClasspath(),
+                true);
     }
 
     /**
@@ -74,19 +80,21 @@ public class ObjectMapperConfig implements Config {
      */
     public ObjectMapperConfig(ObjectMapper defaultObjectMapper) {
         this(defaultObjectMapper, null, new DefaultGsonObjectMapperFactory(), new DefaultJackson1ObjectMapperFactory(),
-                new DefaultJackson2ObjectMapperFactory(), new DefaultJAXBObjectMapperFactory(), 
-                    new DefaultJohnzonObjectMapperFactory(), new DefaultYassonObjectMapperFactory(), true);
+                new DefaultJackson2ObjectMapperFactory(), newJaxbObjectMapperFactoryOrNullIfNotInClasspath(),
+                new DefaultJohnzonObjectMapperFactory(), new DefaultYassonObjectMapperFactory(), newJakartaEEObjectMapperFactoryOrNullIfNotInClasspath(),
+                true);
     }
 
     private ObjectMapperConfig(ObjectMapper defaultObjectMapper, ObjectMapperType defaultObjectMapperType,
                                GsonObjectMapperFactory gsonObjectMapperFactory, Jackson1ObjectMapperFactory jackson1ObjectMapperFactory,
                                Jackson2ObjectMapperFactory jackson2ObjectMapperFactory, JAXBObjectMapperFactory jaxbObjectMapperFactory,
-                               JohnzonObjectMapperFactory johnzonObjectMapperFactory, JsonbObjectMapperFactory jsonbObjectMapperFactory, 
-                               boolean isUserConfigured) {
+                               JohnzonObjectMapperFactory johnzonObjectMapperFactory, JsonbObjectMapperFactory jsonbObjectMapperFactory,
+                               JakartaEEObjectMapperFactory jakartaEEObjectMapperFactory, boolean isUserConfigured) {
         Validate.notNull(gsonObjectMapperFactory, GsonObjectMapperFactory.class.getSimpleName() + " cannot be null");
         Validate.notNull(jackson1ObjectMapperFactory, Jackson1ObjectMapperFactory.class.getSimpleName() + " cannot be null");
         Validate.notNull(jackson2ObjectMapperFactory, Jackson2ObjectMapperFactory.class.getSimpleName() + " cannot be null");
         Validate.notNull(jaxbObjectMapperFactory, JAXBObjectMapperFactory.class.getSimpleName() + " cannot be null");
+        Validate.notNull(jakartaEEObjectMapperFactory, JakartaEEObjectMapperFactory.class.getSimpleName() + " cannot be null");
         this.defaultObjectMapperType = defaultObjectMapperType;
         this.defaultObjectMapper = defaultObjectMapper;
         this.gsonObjectMapperFactory = gsonObjectMapperFactory;
@@ -95,6 +103,7 @@ public class ObjectMapperConfig implements Config {
         this.jaxbObjectMapperFactory = jaxbObjectMapperFactory;
         this.johnzonObjectMapperFactory = johnzonObjectMapperFactory;
         this.jsonbObjectMapperFactory = jsonbObjectMapperFactory;
+        this.jakartaEEObjectMapperFactory = jakartaEEObjectMapperFactory;
         this.isUserConfigured = isUserConfigured;
     }
 
@@ -113,8 +122,8 @@ public class ObjectMapperConfig implements Config {
      */
     public ObjectMapperConfig defaultObjectMapperType(ObjectMapperType defaultObjectMapperType) {
         return new ObjectMapperConfig(defaultObjectMapper, defaultObjectMapperType, gsonObjectMapperFactory,
-                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory, 
-                    johnzonObjectMapperFactory, jsonbObjectMapperFactory, true);
+                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory,
+                johnzonObjectMapperFactory, jsonbObjectMapperFactory, jakartaEEObjectMapperFactory, true);
     }
 
     public ObjectMapper defaultObjectMapper() {
@@ -145,8 +154,8 @@ public class ObjectMapperConfig implements Config {
      */
     public ObjectMapperConfig gsonObjectMapperFactory(GsonObjectMapperFactory gsonObjectMapperFactory) {
         return new ObjectMapperConfig(defaultObjectMapper, defaultObjectMapperType, gsonObjectMapperFactory,
-                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory, 
-                    johnzonObjectMapperFactory, jsonbObjectMapperFactory, true);
+                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory,
+                johnzonObjectMapperFactory, jsonbObjectMapperFactory, jakartaEEObjectMapperFactory, true);
     }
 
     public Jackson1ObjectMapperFactory jackson1ObjectMapperFactory() {
@@ -160,8 +169,8 @@ public class ObjectMapperConfig implements Config {
      */
     public ObjectMapperConfig jackson1ObjectMapperFactory(Jackson1ObjectMapperFactory jackson1ObjectMapperFactory) {
         return new ObjectMapperConfig(defaultObjectMapper, defaultObjectMapperType, gsonObjectMapperFactory,
-                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory, 
-                    johnzonObjectMapperFactory, jsonbObjectMapperFactory, true);
+                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory,
+                johnzonObjectMapperFactory, jsonbObjectMapperFactory, jakartaEEObjectMapperFactory, true);
     }
 
     public Jackson2ObjectMapperFactory jackson2ObjectMapperFactory() {
@@ -175,22 +184,26 @@ public class ObjectMapperConfig implements Config {
      */
     public ObjectMapperConfig jackson2ObjectMapperFactory(Jackson2ObjectMapperFactory jackson2ObjectMapperFactory) {
         return new ObjectMapperConfig(defaultObjectMapper, defaultObjectMapperType, gsonObjectMapperFactory,
-                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory, 
-                   johnzonObjectMapperFactory, jsonbObjectMapperFactory, true);
+                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory,
+                johnzonObjectMapperFactory, jsonbObjectMapperFactory, jakartaEEObjectMapperFactory, true);
     }
 
     public JAXBObjectMapperFactory jaxbObjectMapperFactory() {
         return jaxbObjectMapperFactory;
     }
-    
+
+    public JakartaEEObjectMapperFactory jakartaEEObjectMapperFactory() {
+        return jakartaEEObjectMapperFactory;
+    }
+
     public JohnzonObjectMapperFactory johnzonObjectMapperFactory() {
         return johnzonObjectMapperFactory;
     }
-    
+
     public JsonbObjectMapperFactory jsonbObjectMapperFactory() {
         return jsonbObjectMapperFactory;
     }
-    
+
     /**
      * Specify a custom JSON-B object mapper factory.
      *
@@ -198,8 +211,8 @@ public class ObjectMapperConfig implements Config {
      */
     public ObjectMapperConfig jsonbObjectMapperFactory(JsonbObjectMapperFactory jsonbObjectMapperFactory) {
         return new ObjectMapperConfig(defaultObjectMapper, defaultObjectMapperType, gsonObjectMapperFactory,
-                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory, 
-                   johnzonObjectMapperFactory, jsonbObjectMapperFactory, true);
+                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory,
+                johnzonObjectMapperFactory, jsonbObjectMapperFactory, jakartaEEObjectMapperFactory, true);
     }
 
     /**
@@ -209,8 +222,19 @@ public class ObjectMapperConfig implements Config {
      */
     public ObjectMapperConfig jaxbObjectMapperFactory(JAXBObjectMapperFactory jaxbObjectMapperFactory) {
         return new ObjectMapperConfig(defaultObjectMapper, defaultObjectMapperType, gsonObjectMapperFactory,
-                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory, 
-                    johnzonObjectMapperFactory, jsonbObjectMapperFactory, true);
+                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory,
+                johnzonObjectMapperFactory, jsonbObjectMapperFactory, jakartaEEObjectMapperFactory, true);
+    }
+
+    /**
+     * Specify a custom JakartaEE object mapper factory.
+     *
+     * @param jakartaEEObjectMapperFactory The object mapper factory
+     */
+    public ObjectMapperConfig jakartaEEObjectMapperFactory(JakartaEEObjectMapperFactory jakartaEEObjectMapperFactory) {
+        return new ObjectMapperConfig(defaultObjectMapper, defaultObjectMapperType, gsonObjectMapperFactory,
+                jackson1ObjectMapperFactory, jackson2ObjectMapperFactory, jaxbObjectMapperFactory,
+                johnzonObjectMapperFactory, jsonbObjectMapperFactory, jakartaEEObjectMapperFactory, true);
     }
 
     /**
@@ -232,4 +256,12 @@ public class ObjectMapperConfig implements Config {
     public boolean isUserConfigured() {
         return isUserConfigured;
     }
+
+    private static JAXBObjectMapperFactory newJaxbObjectMapperFactoryOrNullIfNotInClasspath() {
+        return ObjectMapperResolver.isJAXBInClassPath() ? new DefaultJAXBObjectMapperFactory() : null;
+    }
+
+    private static JakartaEEObjectMapperFactory newJakartaEEObjectMapperFactoryOrNullIfNotInClasspath() {
+        return ObjectMapperResolver.isJakartaEEInClassPath() ? new DefaultJakartaEEObjectMapperFactory() : null;
+    }
 }
\ No newline at end of file
diff --git a/rest-assured/src/main/java/io/restassured/mapper/ObjectMapperType.java b/rest-assured/src/main/java/io/restassured/mapper/ObjectMapperType.java
index 2646665e..849521bd 100644
--- a/rest-assured/src/main/java/io/restassured/mapper/ObjectMapperType.java
+++ b/rest-assured/src/main/java/io/restassured/mapper/ObjectMapperType.java
@@ -20,5 +20,5 @@ package io.restassured.mapper;
  * The predefined object mappers that can be used with REST Assured
  */
 public enum ObjectMapperType {
-    JACKSON_2, JACKSON_1, GSON, JAXB, JOHNZON, JSONB
+    JACKSON_2, JACKSON_1, GSON, JAXB, JOHNZON, JSONB, JAKARTA_EE
 }
diff --git a/xml-path/pom.xml b/xml-path/pom.xml
index f7f20b1a..e97996cf 100644
--- a/xml-path/pom.xml
+++ b/xml-path/pom.xml
@@ -39,14 +39,14 @@
                 <configuration>
                     <instructions>
                         <Export-Package>
-                        	io.restassured.path.xml.*,
-                        	io.restassured.internal.path.xml.*
+                            io.restassured.path.xml.*,
+                            io.restassured.internal.path.xml.*
                         </Export-Package>
                         <Import-Package>
-							groovy.*;version="${groovy.range}",
+                            groovy.*;version="${groovy.range}",
                             org.codehaus.groovy.*;version="${groovy.range}",
                             *
-						</Import-Package>
+                        </Import-Package>
                     </instructions>
                 </configuration>
             </plugin>
@@ -80,13 +80,27 @@
             <groupId>org.ccil.cowan.tagsoup</groupId>
             <artifactId>tagsoup</artifactId>
         </dependency>
+        <!-- Backward compatibility with JAXB (Jakarta EE 8?) -->
         <dependency>
-            <groupId>jakarta.xml.bind</groupId>
-            <artifactId>jakarta.xml.bind-api</artifactId>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>com.sun.xml.bind</groupId>
             <artifactId>jaxb-impl</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- Jakarta EE 9 -->
+        <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jaxb</groupId>
+            <artifactId>jaxb-runtime</artifactId>
+            <optional>true</optional>
         </dependency>
 
         <!-- Test -->
diff --git a/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlObjectDeserializer.groovy b/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlObjectDeserializer.groovy
index 041c5739..7905f98c 100644
--- a/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlObjectDeserializer.groovy
+++ b/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlObjectDeserializer.groovy
@@ -53,9 +53,9 @@ class XmlObjectDeserializer {
     }
 
     if (xmlPathConfig.hasDefaultDeserializer()) {
-      return xmlPathConfig.defaultDeserializer().deserialize(deserializationCtx) as T;
+      return xmlPathConfig.defaultDeserializer().deserialize(deserializationCtx) as T
     } else if (mapperType != null || xmlPathConfig.hasDefaultParserType()) {
-      XmlParserType mapperTypeToUse = mapperType == null ? xmlPathConfig.defaultParserType() : mapperType;
+      XmlParserType mapperTypeToUse = mapperType == null ? xmlPathConfig.defaultParserType() : mapperType
       return deserializeWithObjectMapper(deserializationCtx, mapperTypeToUse, xmlPathConfig)
     }
 
diff --git a/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlPathJakartaEEObjectDeserializer.groovy b/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlPathJakartaEEObjectDeserializer.groovy
new file mode 100644
index 00000000..0b04cf78
--- /dev/null
+++ b/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlPathJakartaEEObjectDeserializer.groovy
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.restassured.internal.path.xml.mapping
+
+import io.restassured.common.mapper.ObjectDeserializationContext
+import io.restassured.path.xml.mapper.factory.JakartaEEObjectMapperFactory
+import io.restassured.path.xml.mapping.XmlPathObjectDeserializer
+
+class XmlPathJakartaEEObjectDeserializer implements XmlPathObjectDeserializer {
+
+  private final JakartaEEObjectMapperFactory factory
+
+  XmlPathJakartaEEObjectDeserializer(JakartaEEObjectMapperFactory factory) {
+    this.factory = factory
+  }
+
+  @SuppressWarnings('UnnecessaryQualifiedReference')
+  @Override
+  def deserialize(ObjectDeserializationContext context) {
+    def cls = context.getType()
+    def object = context.getDataToDeserialize().asString()
+    jakarta.xml.bind.JAXBContext jaxbContext = factory.create(cls, context.getCharset())
+
+    jakarta.xml.bind.Unmarshaller unmarshaller = jaxbContext.createUnmarshaller()
+    def reader = new StringReader(object)
+    if (cls.isAnnotationPresent(jakarta.xml.bind.annotation.XmlRootElement.class)) {
+      unmarshaller.unmarshal(reader)
+    } else {
+      jakarta.xml.bind.JAXBElement jaxbElement = unmarshaller.unmarshal(new javax.xml.transform.stream.StreamSource(reader), cls)
+      jaxbElement.getValue()
+    }
+  }
+}
diff --git a/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlPathJaxbObjectDeserializer.groovy b/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlPathJaxbObjectDeserializer.groovy
index 3ab14f9b..9467cbb7 100644
--- a/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlPathJaxbObjectDeserializer.groovy
+++ b/xml-path/src/main/groovy/io/restassured/internal/path/xml/mapping/XmlPathJaxbObjectDeserializer.groovy
@@ -21,12 +21,6 @@ import io.restassured.common.mapper.ObjectDeserializationContext
 import io.restassured.path.xml.mapper.factory.JAXBObjectMapperFactory
 import io.restassured.path.xml.mapping.XmlPathObjectDeserializer
 
-import javax.xml.bind.JAXBContext
-import javax.xml.bind.JAXBElement
-import javax.xml.bind.Unmarshaller
-import javax.xml.bind.annotation.XmlRootElement
-import javax.xml.transform.stream.StreamSource
-
 class XmlPathJaxbObjectDeserializer implements XmlPathObjectDeserializer {
 
   private final JAXBObjectMapperFactory factory
@@ -35,18 +29,19 @@ class XmlPathJaxbObjectDeserializer implements XmlPathObjectDeserializer {
     this.factory = factory
   }
 
+  @SuppressWarnings('UnnecessaryQualifiedReference')
   @Override
   def deserialize(ObjectDeserializationContext context) {
     def cls = context.getType()
     def object = context.getDataToDeserialize().asString()
-    JAXBContext jaxbContext = factory.create(cls, context.getCharset())
+    javax.xml.bind.JAXBContext jaxbContext = factory.create(cls, context.getCharset())
 
-    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller()
+    javax.xml.bind.Unmarshaller unmarshaller = jaxbContext.createUnmarshaller()
     def reader = new StringReader(object)
-    if (cls.isAnnotationPresent(XmlRootElement.class)) {
+    if (cls.isAnnotationPresent(javax.xml.bind.annotation.XmlRootElement.class)) {
       unmarshaller.unmarshal(reader)
     } else {
-      JAXBElement jaxbElement = unmarshaller.unmarshal(new StreamSource(reader), cls)
+      javax.xml.bind.JAXBElement jaxbElement = unmarshaller.unmarshal(new javax.xml.transform.stream.StreamSource(reader), cls)
       jaxbElement.getValue()
     }
   }
diff --git a/xml-path/src/main/java/io/restassured/path/xml/config/XmlPathConfig.java b/xml-path/src/main/java/io/restassured/path/xml/config/XmlPathConfig.java
index c42ef8d9..505009fe 100644
--- a/xml-path/src/main/java/io/restassured/path/xml/config/XmlPathConfig.java
+++ b/xml-path/src/main/java/io/restassured/path/xml/config/XmlPathConfig.java
@@ -16,6 +16,7 @@
 
 package io.restassured.path.xml.config;
 
+import io.restassured.common.mapper.resolver.ObjectMapperResolver;
 import io.restassured.path.xml.XmlPath;
 import io.restassured.path.xml.mapper.factory.DefaultJAXBObjectMapperFactory;
 import io.restassured.path.xml.mapper.factory.JAXBObjectMapperFactory;
@@ -55,7 +56,7 @@ public class XmlPathConfig {
      */
     public XmlPathConfig(XmlPathConfig config) {
         this(config.jaxbObjectMapperFactory(), config.defaultParserType(), config.defaultDeserializer(), config.charset(),
-                new HashMap<String, Boolean>(), new HashMap<String, String>(), new HashMap<String, Object>(), config.isValidating(),
+                new HashMap<>(), new HashMap<>(), new HashMap<>(), config.isValidating(),
                 config.isNamespaceAware(), config.isAllowDocTypeDeclaration());
     }
 
@@ -63,16 +64,15 @@ public class XmlPathConfig {
      * Creates a new XmlPathConfig that is configured to use the default JAXBObjectMapperFactory.
      */
     public XmlPathConfig() {
-        this(new DefaultJAXBObjectMapperFactory(), null, null, defaultCharset(), new HashMap<String, Boolean>(), new HashMap<String, String>(),
-                new HashMap<String, Object>(), DEFAULT_VALIDATING, DEFAULT_NAMESPACE_AWARE, DEFAULT_ALLOW_DOC_TYPE_DECLARATION);
+        this(newDefaultJaxbObjectMapperFactoryOrNull(), null, null, defaultCharset(), new HashMap<>(), new HashMap<>(),
+                new HashMap<>(), DEFAULT_VALIDATING, DEFAULT_NAMESPACE_AWARE, DEFAULT_ALLOW_DOC_TYPE_DECLARATION);
     }
 
-
     /**
      * Create a new XmlPathConfig that uses the <code>defaultCharset</code> when deserializing XML data.
      */
     public XmlPathConfig(String defaultCharset) {
-        this(new DefaultJAXBObjectMapperFactory(), null, null, defaultCharset, new HashMap<String, Boolean>(), new HashMap<String, String>(), new HashMap<String, Object>(),
+        this(newDefaultJaxbObjectMapperFactoryOrNull(), null, null, defaultCharset, new HashMap<>(), new HashMap<>(), new HashMap<>(),
                 DEFAULT_VALIDATING, DEFAULT_NAMESPACE_AWARE, DEFAULT_ALLOW_DOC_TYPE_DECLARATION);
 
     }
@@ -104,7 +104,7 @@ public class XmlPathConfig {
      * @see org.xml.sax.XMLReader#setFeature(java.lang.String, boolean)
      */
     public Map<String, Boolean> features() {
-        return new HashMap<String, Boolean>(features);
+        return new HashMap<>(features);
     }
 
     /**
@@ -130,7 +130,7 @@ public class XmlPathConfig {
      */
     public XmlPathConfig feature(String uri, boolean enabled) {
         Validate.notEmpty(uri, "URI cannot be empty");
-        Map<String, Boolean> newFeatures = new HashMap<String, Boolean>(features);
+        Map<String, Boolean> newFeatures = new HashMap<>(features);
         newFeatures.put(uri, enabled);
         return new XmlPathConfig(jaxbObjectMapperFactory, defaultParserType, defaultDeserializer, charset, newFeatures, declaredNamespaces, properties, validating, namespaceAware, allowDocTypeDeclaration);
     }
@@ -203,7 +203,7 @@ public class XmlPathConfig {
      * @see org.xml.sax.XMLReader#setProperty(String, Object)
      */
     public Map<String, Object> properties() {
-        return new HashMap<String, Object>(properties);
+        return new HashMap<>(properties);
     }
 
     /**
@@ -229,7 +229,7 @@ public class XmlPathConfig {
      */
     public XmlPathConfig property(String name, Object value) {
         Validate.notEmpty(name, "Name cannot be empty");
-        Map<String, Object> newProperties = new HashMap<String, Object>(properties);
+        Map<String, Object> newProperties = new HashMap<>(properties);
         newProperties.put(name, value);
         return new XmlPathConfig(jaxbObjectMapperFactory, defaultParserType, defaultDeserializer, charset, features, declaredNamespaces,
                 newProperties, validating, namespaceAware, allowDocTypeDeclaration);
@@ -248,7 +248,7 @@ public class XmlPathConfig {
      * @see #feature(String, boolean)
      */
     public XmlPathConfig disableLoadingOfExternalDtd() {
-        Map<String, Boolean> newFeatures = new HashMap<String, Boolean>(features);
+        Map<String, Boolean> newFeatures = new HashMap<>(features);
         newFeatures.put("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
         newFeatures.put("http://apache.org/xml/features/disallow-doctype-decl", false);
         return new XmlPathConfig(jaxbObjectMapperFactory, defaultParserType, defaultDeserializer, charset, newFeatures, declaredNamespaces,
@@ -319,7 +319,7 @@ public class XmlPathConfig {
      * @see org.xml.sax.XMLReader#setFeature(java.lang.String, boolean)
      */
     public Map<String, String> declaredNamespaces() {
-        return new HashMap<String, String>(declaredNamespaces);
+        return new HashMap<>(declaredNamespaces);
     }
 
     /**
@@ -345,7 +345,7 @@ public class XmlPathConfig {
     public XmlPathConfig declaredNamespace(String prefix, String namespaceURI) {
         Validate.notEmpty(prefix, "Prefix cannot be empty");
         Validate.notEmpty(namespaceURI, "Namespace URI cannot be empty");
-        Map<String, String> updatedNamespaces = new HashMap<String, String>(declaredNamespaces);
+        Map<String, String> updatedNamespaces = new HashMap<>(declaredNamespaces);
         updatedNamespaces.put(prefix, namespaceURI);
         return new XmlPathConfig(jaxbObjectMapperFactory, defaultParserType, defaultDeserializer, charset, features, updatedNamespaces,
                 properties, validating, true, allowDocTypeDeclaration);
@@ -389,4 +389,12 @@ public class XmlPathConfig {
     public static XmlPathConfig xmlPathConfig() {
         return new XmlPathConfig();
     }
+
+    private static DefaultJAXBObjectMapperFactory newDefaultJaxbObjectMapperFactoryOrNull() {
+        if (ObjectMapperResolver.isJAXBInClassPath()) {
+            return new DefaultJAXBObjectMapperFactory();
+        } else {
+            return null;
+        }
+    }
 }
diff --git a/xml-path/src/main/java/io/restassured/path/xml/mapper/factory/DefaultJakartaEEObjectMapperFactory.java b/xml-path/src/main/java/io/restassured/path/xml/mapper/factory/DefaultJakartaEEObjectMapperFactory.java
new file mode 100644
index 00000000..ed1d0c1f
--- /dev/null
+++ b/xml-path/src/main/java/io/restassured/path/xml/mapper/factory/DefaultJakartaEEObjectMapperFactory.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.restassured.path.xml.mapper.factory;
+
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.JAXBException;
+
+import java.lang.reflect.Type;
+
+/**
+ * Simply creates a new JAXBContext based on the supplied class.
+ */
+public class DefaultJakartaEEObjectMapperFactory implements JakartaEEObjectMapperFactory {
+    public JAXBContext create(Type cls, String charset) {
+        try {
+            if (cls instanceof Class) {
+                return JAXBContext.newInstance((Class<?>) cls);
+            }
+            throw new RuntimeException("JAXB does not support type" + cls);
+        } catch (JAXBException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
\ No newline at end of file
diff --git a/xml-path/src/main/java/io/restassured/path/xml/mapper/factory/JakartaEEObjectMapperFactory.java b/xml-path/src/main/java/io/restassured/path/xml/mapper/factory/JakartaEEObjectMapperFactory.java
new file mode 100644
index 00000000..7edb1bad
--- /dev/null
+++ b/xml-path/src/main/java/io/restassured/path/xml/mapper/factory/JakartaEEObjectMapperFactory.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.restassured.path.xml.mapper.factory;
+
+import io.restassured.common.mapper.factory.ObjectMapperFactory;
+
+
+/**
+ * Interface for JAXB object mappers. Implement this class and register it to the ObjectMapperConfig if you
+ * want to override default settings for the JAXB object mapper.
+ */
+public interface JakartaEEObjectMapperFactory extends ObjectMapperFactory<jakarta.xml.bind.JAXBContext> {
+}


Test patch:
diff --git a/examples/rest-assured-itest-java/pom.xml b/examples/rest-assured-itest-java/pom.xml
index 469d0aca..9745c3c3 100644
--- a/examples/rest-assured-itest-java/pom.xml
+++ b/examples/rest-assured-itest-java/pom.xml
@@ -73,6 +73,25 @@
             <artifactId>jetty-webapp</artifactId>
             <version>9.4.34.v20201102</version>
         </dependency>
+        <!-- Jakarta EE 9 (important to put this before Jakarta EE 8 in classpath) -->
+        <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jaxb</groupId>
+            <artifactId>jaxb-runtime</artifactId>
+        </dependency>
+        <!-- Jakarta EE 8 -->
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
diff --git a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/ObjectMappingITest.java b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/ObjectMappingITest.java
index 4b21d92d..9838c9a3 100644
--- a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/ObjectMappingITest.java
+++ b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/ObjectMappingITest.java
@@ -17,6 +17,7 @@
 package io.restassured.itest.java;
 
 import io.restassured.RestAssured;
+import io.restassured.config.ObjectMapperConfig;
 import io.restassured.config.RestAssuredConfig;
 import io.restassured.http.ContentType;
 import io.restassured.itest.java.objects.Greeting;
@@ -35,14 +36,14 @@ import static org.hamcrest.Matchers.equalTo;
 public class ObjectMappingITest extends WithJetty {
 
     @Test
-    public void mapResponseToObjectUsingJackson() throws Exception {
+    public void mapResponseToObjectUsingJackson() {
         final ScalatraObject object = get("/hello").as(ScalatraObject.class);
 
         assertThat(object.getHello(), equalTo("Hello Scalatra"));
     }
 
     @Test
-    public void mapResponseToObjectUsingJaxb() throws Exception {
+    public void mapResponseToObjectUsingJakartaEESinceItIsDefaultWhenFoundInClasspath() {
         final Greeting object = given().params("firstName", "John", "lastName", "Doe").when().get("/greetXML").as(Greeting.class);
 
         assertThat(object.getFirstName(), equalTo("John"));
@@ -50,7 +51,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void mapResponseToObjectUsingJacksonWhenNoContentTypeIsDefined() throws Exception {
+    public void mapResponseToObjectUsingJacksonWhenNoContentTypeIsDefined() {
         final Message message =
                 expect().
                         defaultParser(JSON).
@@ -61,14 +62,14 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void contentTypesEndingWithPlusJsonWorksForJsonObjectMapping() throws Exception {
+    public void contentTypesEndingWithPlusJsonWorksForJsonObjectMapping() {
         final Message message = get("/mimeTypeWithPlusJson").as(Message.class);
 
         assertThat(message.getMessage(), equalTo("It works"));
     }
 
     @Test
-    public void whenNoRequestContentTypeIsSpecifiedThenRestAssuredSerializesToJSON() throws Exception {
+    public void whenNoRequestContentTypeIsSpecifiedThenRestAssuredSerializesToJSON() {
         final ScalatraObject object = new ScalatraObject();
         object.setHello("Hello world");
         final ScalatraObject actual = expect().defaultParser(JSON).given().body(object).when().post("/reflect").as(ScalatraObject.class);
@@ -76,7 +77,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void whenRequestContentTypeIsJsonThenRestAssuredSerializesToJSON() throws Exception {
+    public void whenRequestContentTypeIsJsonThenRestAssuredSerializesToJSON() {
         final ScalatraObject object = new ScalatraObject();
         object.setHello("Hello world");
         final ScalatraObject actual = given().contentType(ContentType.JSON).and().body(object).when().post("/reflect").as(ScalatraObject.class);
@@ -84,7 +85,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void whenRequestContentTypeIsXmlThenRestAssuredSerializesToXML() throws Exception {
+    public void whenRequestContentTypeIsXmlThenRestAssuredSerializesToXMLUsingDefaultJakartaEE() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -93,7 +94,16 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void whenRequestContentTypeIsXmlAndCharsetIsUsAsciiThenRestAssuredSerializesToJSON() throws Exception {
+    public void whenRequestContentTypeIsXmlThenRestAssuredSerializesToXMLUsingExplicitJaxb() {
+        final Greeting object = new Greeting();
+        object.setFirstName("John");
+        object.setLastName("Doe");
+        final Greeting actual = given().contentType(ContentType.XML).and().body(object, ObjectMapperType.JAXB).when().post("/reflect").as(Greeting.class);
+        assertThat(object, equalTo(actual));
+    }
+
+    @Test
+    public void whenRequestContentTypeIsXmlAndCharsetIsUsAsciiThenRestAssuredSerializesToXMLUsingDefaultJakartaEE() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -102,7 +112,16 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void whenRequestContentTypeIsJsonAndCharsetIsUsAsciiThenRestAssuredSerializesToJSON() throws Exception {
+    public void whenRequestContentTypeIsXmlAndCharsetIsUsAsciiThenRestAssuredSerializesToXMLUsingExplicitJaxb() {
+        final Greeting object = new Greeting();
+        object.setFirstName("John");
+        object.setLastName("Doe");
+        final Greeting actual = given().contentType("application/xml; charset=US-ASCII").and().body(object, ObjectMapperType.JAXB).when().post("/reflect").as(Greeting.class);
+        assertThat(object, equalTo(actual));
+    }
+
+    @Test
+    public void whenRequestContentTypeIsJsonAndCharsetIsUsAsciiThenRestAssuredSerializesToJSON() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -111,7 +130,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void whenRequestContentTypeIsXmlAndCharsetIsUtf16ThenRestAssuredSerializesToJSON() throws Exception {
+    public void whenRequestContentTypeIsXmlAndCharsetIsUtf16ThenRestAssuredSerializesToXML() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -120,7 +139,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void whenRequestContentTypeIsXmlAndDefaultCharsetIsUtf16ThenRestAssuredSerializesToJSON() throws Exception {
+    public void whenRequestContentTypeIsXmlAndDefaultCharsetIsUtf16ThenRestAssuredSerializesToXML() {
         RestAssured.config = RestAssuredConfig.config().encoderConfig(encoderConfig().defaultContentCharset("UTF-16"));
         try {
             final Greeting object = new Greeting();
@@ -134,7 +153,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void whenRequestContentTypeIsJsonAndCharsetIsUtf16ThenRestAssuredSerializesToJSON() throws Exception {
+    public void whenRequestContentTypeIsJsonAndCharsetIsUtf16ThenRestAssuredSerializesToJSON() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -143,7 +162,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void mapResponseToObjectUsingJaxbWithJaxObjectMapperDefined() throws Exception {
+    public void mapResponseToObjectUsingJaxbWithJaxObjectMapperDefined() {
         final Greeting object = given().params("firstName", "John", "lastName", "Doe").when().get("/greetXML").as(Greeting.class, ObjectMapperType.JAXB);
 
         assertThat(object.getFirstName(), equalTo("John"));
@@ -151,28 +170,28 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void mapResponseToObjectUsingJackson1WithJacksonObjectMapperDefined() throws Exception {
+    public void mapResponseToObjectUsingJackson1WithJacksonObjectMapperDefined() {
         final ScalatraObject object = get("/hello").as(ScalatraObject.class, ObjectMapperType.JACKSON_1);
 
         assertThat(object.getHello(), equalTo("Hello Scalatra"));
     }
 
     @Test
-    public void mapResponseToObjectUsingJackson2WithJacksonObjectMapperDefined() throws Exception {
+    public void mapResponseToObjectUsingJackson2WithJacksonObjectMapperDefined() {
         final ScalatraObject object = get("/hello").as(ScalatraObject.class, ObjectMapperType.JACKSON_2);
 
         assertThat(object.getHello(), equalTo("Hello Scalatra"));
     }
 
     @Test
-    public void mapResponseToObjectUsingGsonWithGsonObjectMapperDefined() throws Exception {
+    public void mapResponseToObjectUsingGsonWithGsonObjectMapperDefined() {
         final ScalatraObject object = get("/hello").as(ScalatraObject.class, ObjectMapperType.GSON);
 
         assertThat(object.getHello(), equalTo("Hello Scalatra"));
     }
 
     @Test
-    public void serializesUsingJAXBWhenJAXBObjectMapperIsSpecified() throws Exception {
+    public void serializesUsingJAXBWhenJAXBObjectMapperIsSpecified() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -181,7 +200,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void serializesUsingJAXBWhenJAXBObjectMapperIsSpecifiedForPatchVerb() throws Exception {
+    public void serializesUsingJAXBWhenJAXBObjectMapperIsSpecifiedForPatchVerb() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -190,7 +209,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void serializesUsingGsonWhenGsonObjectMapperIsSpecified() throws Exception {
+    public void serializesUsingGsonWhenGsonObjectMapperIsSpecified() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -199,7 +218,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void serializesUsingJacksonWhenJacksonObjectMapperIsSpecified() throws Exception {
+    public void serializesUsingJacksonWhenJacksonObjectMapperIsSpecified() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
@@ -208,7 +227,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void serializesNormalParams() throws Exception {
+    public void serializesNormalParams() {
         final Greeting object = new Greeting();
         object.setFirstName("John");
         object.setLastName("Doe");
diff --git a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/SSLITest.java b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/SSLITest.java
index 5e4ad1ce..9285aac2 100644
--- a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/SSLITest.java
+++ b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/SSLITest.java
@@ -173,11 +173,13 @@ public class SSLITest extends WithJetty {
         RestAssured.given().config(RestAssuredConfig.config().sslConfig(SSLConfig.sslConfig().relaxedHTTPSValidation())).when().get("https://localhost:8443/hello").then().spec(helloWorldSpec());
     }
 
+    @Ignore("Site is not working anymore")
     @Test public void
     relaxed_https_validation_works_using_instance_dsl() {
         RestAssured.given().relaxedHTTPSValidation().when().get("https://bunny.cloudamqp.com/api/").then().statusCode(200);
     }
 
+    @Ignore("Site is not working anymore")
     @Test public void
     relaxed_https_validation_works_when_defined_statically() {
         RestAssured.useRelaxedHTTPSValidation();
@@ -189,6 +191,7 @@ public class SSLITest extends WithJetty {
         }
     }
 
+    @Ignore("Site is not working anymore")
     @Test public void
     relaxed_https_validation_works_when_defined_statically_with_base_uri() {
         RestAssured.useRelaxedHTTPSValidation();
diff --git a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/objects/Greeting.java b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/objects/Greeting.java
index 968c8c0a..6a222efe 100644
--- a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/objects/Greeting.java
+++ b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/objects/Greeting.java
@@ -18,10 +18,9 @@ package io.restassured.itest.java.objects;
 
 import org.junit.Ignore;
 
-import javax.xml.bind.annotation.XmlRootElement;
-
 @Ignore
-@XmlRootElement
+@javax.xml.bind.annotation.XmlRootElement
+@jakarta.xml.bind.annotation.XmlRootElement
 public class Greeting {
     private String firstName;
     private String lastName;