Repository: rest-assured/rest-assured
Pull request #1494 (2021-07-24 20:17:19)

Fix for #1069: fails to parse responses with cookies that has numbers out of signed decimal range
Changed cookie maxAge from int to long as suggested by @Mjl33


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..49600551 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,22 @@
+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'.
+* Upgraded groovy from 3.0.8 to 3.0.9 (thanks to sullis for pull request)
+* Added support for adding multiple LogDetails to the RequestLoggingFilter. You can now do e.g.:
+
+    given().filter(RequestLoggingFilter.with(LogDetail.METHOD, LogDetail.HEADERS, LogDetail.BODY)).when(). ..
+
+  Thanks to lucasnguyen17 for pull request.
+* Fix default implementation of deprecated method detachRoot (#1503) (thanks to Guillaume Boucherie for pull request)
+* Add on fail message builder for response specification (#1502). This means that you can no do:
+  when().
+        get().
+  then().
+        onFailMessage("Some specific message").
+        statusCode(200);
+ The "onFailMessage" will be shown in the error. This is good if you want to e.g. distinguish more easily between tests if they fail. (thanks to Victor Borovlev for pull request)
+
 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/json-path/src/main/groovy/io/restassured/internal/path/json/mapping/JsonObjectDeserializer.groovy b/json-path/src/main/groovy/io/restassured/internal/path/json/mapping/JsonObjectDeserializer.groovy
index c713c27a..b23e7d67 100644
--- a/json-path/src/main/groovy/io/restassured/internal/path/json/mapping/JsonObjectDeserializer.groovy
+++ b/json-path/src/main/groovy/io/restassured/internal/path/json/mapping/JsonObjectDeserializer.groovy
@@ -25,12 +25,7 @@ import io.restassured.common.mapper.resolver.ObjectMapperResolver
 import io.restassured.internal.common.mapper.ObjectDeserializationContextImpl
 import io.restassured.path.json.config.JsonParserType
 import io.restassured.path.json.config.JsonPathConfig
-import io.restassured.path.json.mapper.factory.GsonObjectMapperFactory
-import io.restassured.path.json.mapper.factory.Jackson1ObjectMapperFactory
-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.json.mapper.factory.*
 import org.apache.commons.lang3.Validate
 
 class JsonObjectDeserializer {
diff --git a/json-path/src/main/groovy/io/restassured/internal/path/json/mapping/JsonPathJsonbObjectDeserializer.groovy b/json-path/src/main/groovy/io/restassured/internal/path/json/mapping/JsonPathJsonbObjectDeserializer.groovy
index 233b7a40..22eae476 100644
--- a/json-path/src/main/groovy/io/restassured/internal/path/json/mapping/JsonPathJsonbObjectDeserializer.groovy
+++ b/json-path/src/main/groovy/io/restassured/internal/path/json/mapping/JsonPathJsonbObjectDeserializer.groovy
@@ -19,8 +19,8 @@ package io.restassured.internal.path.json.mapping
 import io.restassured.common.mapper.ObjectDeserializationContext
 import io.restassured.path.json.mapper.factory.JsonbObjectMapperFactory
 import io.restassured.path.json.mapping.JsonPathObjectDeserializer
-import javax.json.bind.Jsonb
 
+import javax.json.bind.Jsonb
 import java.lang.reflect.Type
 
 import static io.restassured.internal.common.assertion.AssertParameter.notNull
diff --git a/json-path/src/main/java/io/restassured/path/json/mapper/factory/DefaultYassonObjectMapperFactory.java b/json-path/src/main/java/io/restassured/path/json/mapper/factory/DefaultYassonObjectMapperFactory.java
index 42f62ff0..95947f37 100644
--- a/json-path/src/main/java/io/restassured/path/json/mapper/factory/DefaultYassonObjectMapperFactory.java
+++ b/json-path/src/main/java/io/restassured/path/json/mapper/factory/DefaultYassonObjectMapperFactory.java
@@ -15,11 +15,10 @@
  */
 package io.restassured.path.json.mapper.factory;
 
-import java.lang.reflect.Type;
+import org.eclipse.yasson.JsonBindingProvider;
 
 import javax.json.bind.Jsonb;
-
-import org.eclipse.yasson.JsonBindingProvider;
+import java.lang.reflect.Type;
 
 public class DefaultYassonObjectMapperFactory implements JsonbObjectMapperFactory {
     
diff --git a/json-path/src/main/java/io/restassured/path/json/mapper/factory/JsonbObjectMapperFactory.java b/json-path/src/main/java/io/restassured/path/json/mapper/factory/JsonbObjectMapperFactory.java
index 9d656483..fdaa404a 100644
--- a/json-path/src/main/java/io/restassured/path/json/mapper/factory/JsonbObjectMapperFactory.java
+++ b/json-path/src/main/java/io/restassured/path/json/mapper/factory/JsonbObjectMapperFactory.java
@@ -16,10 +16,10 @@
 
 package io.restassured.path.json.mapper.factory;
 
-import javax.json.bind.Jsonb;
-
 import io.restassured.common.mapper.factory.ObjectMapperFactory;
 
+import javax.json.bind.Jsonb;
+
 /**
  * Interface for JSON-B object mappers. Implement this class and register it to the ObjectMapperConfig if you
  * want to override default settings for the Jsonb object mapper.
diff --git a/modules/spring-mock-mvc/src/main/java/io/restassured/module/mockmvc/internal/MockMvcRequestSenderImpl.java b/modules/spring-mock-mvc/src/main/java/io/restassured/module/mockmvc/internal/MockMvcRequestSenderImpl.java
index 3e0d9623..b0fa6a84 100644
--- a/modules/spring-mock-mvc/src/main/java/io/restassured/module/mockmvc/internal/MockMvcRequestSenderImpl.java
+++ b/modules/spring-mock-mvc/src/main/java/io/restassured/module/mockmvc/internal/MockMvcRequestSenderImpl.java
@@ -370,7 +370,7 @@ class MockMvcRequestSenderImpl implements MockMvcRequestSender, MockMvcRequestAs
                     servletCookie.setDomain(cookie.getDomain());
                 }
                 if (cookie.hasMaxAge()) {
-                    servletCookie.setMaxAge(cookie.getMaxAge());
+                    servletCookie.setMaxAge((int) cookie.getMaxAge());
                 }
                 if (cookie.hasPath()) {
                     servletCookie.setPath(cookie.getPath());
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/assertion/CookieMatcher.groovy b/rest-assured/src/main/groovy/io/restassured/assertion/CookieMatcher.groovy
index 231e91b9..547f5938 100644
--- a/rest-assured/src/main/groovy/io/restassured/assertion/CookieMatcher.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/assertion/CookieMatcher.groovy
@@ -137,7 +137,7 @@ class CookieMatcher {
             } else if(equalsIgnoreCase(name, DOMAIN)) {
                 builder.setDomain(value)
             } else if(equalsIgnoreCase(name, MAX_AGE)) {
-                builder.setMaxAge(Integer.parseInt(value))
+                builder.setMaxAge(Long.parseLong(value))
             } else if(equalsIgnoreCase(name, SECURE)) {
                 builder.setSecured(true)
             } else if(equalsIgnoreCase(name, HTTP_ONLY)) {
diff --git a/rest-assured/src/main/groovy/io/restassured/internal/ResponseSpecificationImpl.groovy b/rest-assured/src/main/groovy/io/restassured/internal/ResponseSpecificationImpl.groovy
index 220fb6d2..554263c9 100644
--- a/rest-assured/src/main/groovy/io/restassured/internal/ResponseSpecificationImpl.groovy
+++ b/rest-assured/src/main/groovy/io/restassured/internal/ResponseSpecificationImpl.groovy
@@ -61,6 +61,7 @@ class ResponseSpecificationImpl implements FilterableResponseSpecification {
   private Tuple2<Matcher<Long>, TimeUnit> expectedResponseTime;
   private LogDetail responseLogDetail
   private boolean forceDisableEagerAssert = false
+  private String onFailMessage
 
   private contentParser
   LogRepository logRepository
@@ -311,6 +312,11 @@ class ResponseSpecificationImpl implements FilterableResponseSpecification {
     this
   }
 
+  ResponseSpecification onFailMessage(String message) {
+    this.onFailMessage = message
+    this
+  }
+
   LogDetail getLogDetail() {
     responseLogDetail
   }
@@ -490,11 +496,15 @@ class ResponseSpecificationImpl implements FilterableResponseSpecification {
           fireFailureListeners(response)
           def errorMessage = errors.collect { it.errorMessage }.join("\n")
           def s = numberOfErrors > 1 ? "s" : ""
-          throw new AssertionError("$numberOfErrors expectation$s failed.\n$errorMessage")
+          throw new AssertionError("$numberOfErrors expectation$s failed.\n$errorMessage$formattedOnFailMessage")
         }
       }
     }
 
+    private String getFormattedOnFailMessage() {
+      onFailMessage ? "\nOn fail message: $onFailMessage" : ""
+    }
+
     private void fireFailureListeners(Response response) {
       config.getFailureConfig().getFailureListeners().each {
         it.onFailure(
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..38629449
--- /dev/null
+++ b/rest-assured/src/main/groovy/io/restassured/internal/mapping/JakartaEEMapper.groovy
@@ -0,0 +1,53 @@
+/*
+ * 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.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..018a2290 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
@@ -25,12 +25,9 @@ import io.restassured.internal.http.ContentTypeExtractor
 import io.restassured.mapper.ObjectMapperDeserializationContext
 import io.restassured.mapper.ObjectMapperSerializationContext
 import io.restassured.mapper.ObjectMapperType
-import io.restassured.path.json.mapper.factory.GsonObjectMapperFactory
-import io.restassured.path.json.mapper.factory.Jackson1ObjectMapperFactory
-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.json.mapper.factory.*
 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 +65,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 +85,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 +95,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 +116,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 +137,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 +163,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 +191,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 +222,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 +238,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/RestAssured.java b/rest-assured/src/main/java/io/restassured/RestAssured.java
index 8e74ec57..1be30467 100644
--- a/rest-assured/src/main/java/io/restassured/RestAssured.java
+++ b/rest-assured/src/main/java/io/restassured/RestAssured.java
@@ -19,15 +19,16 @@ package io.restassured;
 import io.restassured.authentication.*;
 import io.restassured.builder.RequestSpecBuilder;
 import io.restassured.builder.ResponseSpecBuilder;
-import io.restassured.config.*;
+import io.restassured.config.LogConfig;
+import io.restassured.config.RestAssuredConfig;
+import io.restassured.config.SSLConfig;
+import io.restassured.config.SessionConfig;
 import io.restassured.filter.Filter;
 import io.restassured.filter.log.LogDetail;
 import io.restassured.http.Method;
 import io.restassured.internal.*;
 import io.restassured.internal.common.assertion.AssertParameter;
 import io.restassured.internal.log.LogRepository;
-import io.restassured.mapper.ObjectMapper;
-import io.restassured.mapper.ObjectMapperType;
 import io.restassured.matcher.RestAssuredMatchers;
 import io.restassured.parsing.Parser;
 import io.restassured.path.json.JsonPath;
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/filter/log/RequestLoggingFilter.java b/rest-assured/src/main/java/io/restassured/filter/log/RequestLoggingFilter.java
index f84b00e9..b951d073 100644
--- a/rest-assured/src/main/java/io/restassured/filter/log/RequestLoggingFilter.java
+++ b/rest-assured/src/main/java/io/restassured/filter/log/RequestLoggingFilter.java
@@ -26,6 +26,7 @@ import org.apache.commons.lang3.Validate;
 
 import java.io.PrintStream;
 import java.nio.charset.Charset;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
@@ -48,6 +49,7 @@ public class RequestLoggingFilter implements Filter {
     private final boolean shouldPrettyPrint;
     private final boolean showUrlEncodedUri;
     private final Set<String> blacklistedHeaders;
+    private final Set<LogDetail> logDetailSet = new HashSet<>();
 
     /**
      * Logs to System.out
@@ -136,7 +138,11 @@ public class RequestLoggingFilter implements Filter {
             uri = UrlDecoder.urlDecode(uri, Charset.forName(requestSpec.getConfig().getEncoderConfig().defaultQueryParameterCharset()), true);
         }
 
-        RequestPrinter.print(requestSpec, requestSpec.getMethod(), uri, logDetail, blacklistedHeaders, stream, shouldPrettyPrint);
+        if (logDetailSet.isEmpty()) {
+            RequestPrinter.print(requestSpec, requestSpec.getMethod(), uri, logDetail, blacklistedHeaders, stream, shouldPrettyPrint);
+        } else {
+            RequestPrinter.print(requestSpec, requestSpec.getMethod(), uri, logDetailSet, blacklistedHeaders, stream, shouldPrettyPrint);
+        }
         return ctx.next(requestSpec, responseSpec);
     }
 
@@ -150,4 +156,19 @@ public class RequestLoggingFilter implements Filter {
         return new RequestLoggingFilter(stream);
     }
 
+    /**
+     * Logs with specific details to System.out <br>
+     * E.g <code>RequestLoggingFilter.with(METHOD, HEADERS, BODY)</code>
+     *
+     * @param logDetails The varargs of logDetail
+     * @return A new instance of {@link RequestLoggingFilter}.
+     */
+    public static RequestLoggingFilter with(LogDetail... logDetails) {
+        return new RequestLoggingFilter().addLog(logDetails);
+    }
+
+    private RequestLoggingFilter addLog(LogDetail... logDetails) {
+        logDetailSet.addAll(Arrays.asList(logDetails));
+        return this;
+    }
 }
diff --git a/rest-assured/src/main/java/io/restassured/http/Cookie.java b/rest-assured/src/main/java/io/restassured/http/Cookie.java
index cb07b45c..26c6c6f8 100644
--- a/rest-assured/src/main/java/io/restassured/http/Cookie.java
+++ b/rest-assured/src/main/java/io/restassured/http/Cookie.java
@@ -23,6 +23,7 @@ import java.util.Date;
 import java.util.TimeZone;
 
 import static io.restassured.internal.common.assertion.AssertParameter.notNull;
+import static jdk.nashorn.internal.runtime.JSType.UNDEFINED_LONG;
 
 /**
  * Cookie class represents a token or short packet of state information
@@ -53,7 +54,7 @@ public class Cookie implements NameAndValue {
     private static final String COOKIE_ATTRIBUTE_SEPARATOR = ";";
     private static final String EQUALS = "=";
     private static final int UNDEFINED = -1;
-
+    private static final long UNDEFINED_LONG = -1;
     private final String name;
     private final String value;
     private final String comment;
@@ -63,12 +64,12 @@ public class Cookie implements NameAndValue {
     private final boolean secured;
     private final boolean httpOnly;
     private final int version;
-    private final int maxAge;
+    private final long maxAge;
     private final String sameSite;
 
     private Cookie(String name, String value, String comment, Date expiryDate,
                    String domain, String path, boolean secured, boolean httpOnly, int version,
-                   int maxAge, String sameSite) {
+                   long maxAge, String sameSite) {
         this.name = name;
         this.value = value;
         this.comment = comment;
@@ -217,7 +218,7 @@ public class Cookie implements NameAndValue {
      *				cookie in seconds; if negative, means
      *				the cookie persists until browser shutdown
      */
-    public int getMaxAge() {
+    public long getMaxAge() {
         return maxAge;
     }
 
@@ -278,7 +279,7 @@ public class Cookie implements NameAndValue {
         result = 31 * result + (secured ? 1 : 0);
         result = 31 * result + (httpOnly ? 1 : 0);
         result = 31 * result + version;
-        result = 31 * result + maxAge;
+        result = 31 * result + (int) maxAge;
         result = 31 * result + (sameSite != null ? sameSite.hashCode() : 0);
         return result;
     }
@@ -332,7 +333,7 @@ public class Cookie implements NameAndValue {
         private boolean secured = false;
         private boolean httpOnly = false;
         private int version = UNDEFINED;
-        private int maxAge = UNDEFINED;
+        private long maxAge = UNDEFINED_LONG;
         private String sameSite;
 
         /**
@@ -412,7 +413,7 @@ public class Cookie implements NameAndValue {
          *
          * @return an integer specifying the maximum age of the cookie in seconds; if negative, means the cookie persists until browser shutdown
          */
-        public Builder setMaxAge(int maxAge) {
+        public Builder setMaxAge(long maxAge) {
             this.maxAge = maxAge;
             return this;
         }
diff --git a/rest-assured/src/main/java/io/restassured/internal/http/HTTPBuilder.java b/rest-assured/src/main/java/io/restassured/internal/http/HTTPBuilder.java
index fe3d4603..57e61da9 100644
--- a/rest-assured/src/main/java/io/restassured/internal/http/HTTPBuilder.java
+++ b/rest-assured/src/main/java/io/restassured/internal/http/HTTPBuilder.java
@@ -38,7 +38,6 @@ import org.apache.http.conn.ClientConnectionManager;
 import org.apache.http.conn.params.ConnRoutePNames;
 import org.apache.http.impl.client.AbstractHttpClient;
 import org.apache.http.protocol.HttpContext;
-import org.codehaus.groovy.runtime.DefaultGroovyMethods;
 import org.codehaus.groovy.runtime.IOGroovyMethods;
 import org.codehaus.groovy.runtime.MethodClosure;
 
diff --git a/rest-assured/src/main/java/io/restassured/internal/print/RequestPrinter.java b/rest-assured/src/main/java/io/restassured/internal/print/RequestPrinter.java
index eb5f3ee3..46adbde0 100644
--- a/rest-assured/src/main/java/io/restassured/internal/print/RequestPrinter.java
+++ b/rest-assured/src/main/java/io/restassured/internal/print/RequestPrinter.java
@@ -88,6 +88,46 @@ public class RequestPrinter {
         return logString;
     }
 
+    public static String print(FilterableRequestSpecification requestSpec, String requestMethod,
+                               String completeRequestUri,
+                               Set<LogDetail> logDetails, Set<String> blacklistedHeaders,
+                               PrintStream stream, boolean shouldPrettyPrint) {
+        final StringBuilder builder = new StringBuilder();
+
+        if (logDetails.contains(ALL)) {
+            return print(requestSpec, requestMethod, completeRequestUri, ALL, blacklistedHeaders, stream, shouldPrettyPrint);
+        } else {
+            if (logDetails.contains(METHOD)) {
+                addSingle(builder, "Request method:", requestMethod);
+            }
+            if (logDetails.contains(URI)) {
+                addSingle(builder, "Request URI:", completeRequestUri);
+            }
+            if (logDetails.contains(PARAMS)) {
+                addMapDetails(builder, "Request params:", requestSpec.getRequestParams());
+                addMapDetails(builder, "Query params:", requestSpec.getQueryParams());
+                addMapDetails(builder, "Form params:", requestSpec.getFormParams());
+                addMapDetails(builder, "Path params:", requestSpec.getNamedPathParams());
+            }
+            if (logDetails.contains(HEADERS)) {
+                addHeaders(requestSpec, blacklistedHeaders, builder);
+            }
+            if (logDetails.contains(COOKIES)) {
+                addCookies(requestSpec, builder);
+            }
+            if (logDetails.contains(PARAMS)) {
+                addMultiParts(requestSpec, builder);
+            }
+            if (logDetails.contains(BODY)) {
+                addBody(requestSpec, builder, shouldPrettyPrint);
+            }
+        }
+
+        final String logString = StringUtils.removeEnd(builder.toString(), SystemUtils.LINE_SEPARATOR);
+        stream.println(logString);
+        return logString;
+    }
+
     private static void addProxy(FilterableRequestSpecification requestSpec, StringBuilder builder) {
         builder.append("Proxy:");
         ProxySpecification proxySpec = requestSpec.getProxySpecification();
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/rest-assured/src/main/java/io/restassured/matcher/DetailedCookieMatcher.java b/rest-assured/src/main/java/io/restassured/matcher/DetailedCookieMatcher.java
index 2b645225..d736190e 100644
--- a/rest-assured/src/main/java/io/restassured/matcher/DetailedCookieMatcher.java
+++ b/rest-assured/src/main/java/io/restassured/matcher/DetailedCookieMatcher.java
@@ -187,7 +187,7 @@ public class DetailedCookieMatcher extends CombinableMatcher<Cookie> {
      * @param expectedMaxAgeValue expected max age of cookie
      * @return A {@link DetailedCookieMatcher} instance with and-composed max age property assertion
      */
-    public DetailedCookieMatcher maxAge(int expectedMaxAgeValue) {
+    public DetailedCookieMatcher maxAge(long expectedMaxAgeValue) {
         return maxAge(equalTo(expectedMaxAgeValue));
     }
 
diff --git a/rest-assured/src/main/java/io/restassured/response/ValidatableResponseOptions.java b/rest-assured/src/main/java/io/restassured/response/ValidatableResponseOptions.java
index f175d548..b81426f0 100644
--- a/rest-assured/src/main/java/io/restassured/response/ValidatableResponseOptions.java
+++ b/rest-assured/src/main/java/io/restassured/response/ValidatableResponseOptions.java
@@ -726,7 +726,7 @@ public interface ValidatableResponseOptions<T extends ValidatableResponseOptions
      */
     @Deprecated
     default T detachRoot(String pathToDetach) {
-        return appendRootPath(pathToDetach);
+        return detachRootPath(pathToDetach);
     }
 
     /**
diff --git a/rest-assured/src/main/java/io/restassured/specification/ResponseSpecification.java b/rest-assured/src/main/java/io/restassured/specification/ResponseSpecification.java
index 952f0a43..58e43dec 100644
--- a/rest-assured/src/main/java/io/restassured/specification/ResponseSpecification.java
+++ b/rest-assured/src/main/java/io/restassured/specification/ResponseSpecification.java
@@ -1011,4 +1011,16 @@ public interface ResponseSpecification {
      * @param logDetail The log detail
      */
     ResponseSpecification logDetail(LogDetail logDetail);
+
+    /**
+     * Add user message to final mismatch description.
+     * <p/>
+     * This is useful when you need to associate a mismatch description with additional user information. For example, in parallel execution.
+     * <p/>
+     * Note, if you want to add a description for certain matching, not for all, you should use something like
+     * Hamcrest wrapper matcher - {@link org.hamcrest.CoreMatchers#describedAs}.
+     *
+     * @param message The user message
+     */
+    ResponseSpecification onFailMessage(String message);
 }
\ No newline at end of file
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/GroovyNodeSerializer.groovy b/xml-path/src/main/groovy/io/restassured/internal/path/xml/GroovyNodeSerializer.groovy
index 251cfe0d..be8b400f 100644
--- a/xml-path/src/main/groovy/io/restassured/internal/path/xml/GroovyNodeSerializer.groovy
+++ b/xml-path/src/main/groovy/io/restassured/internal/path/xml/GroovyNodeSerializer.groovy
@@ -16,9 +16,9 @@
 
 package io.restassured.internal.path.xml
 
+import groovy.xml.XmlUtil
 import groovy.xml.slurpersupport.Node
 import groovy.xml.slurpersupport.NodeChild
-import groovy.xml.XmlUtil
 
 class GroovyNodeSerializer {
     static String toXML(Node node) {
diff --git a/xml-path/src/main/groovy/io/restassured/internal/path/xml/XmlRenderer.groovy b/xml-path/src/main/groovy/io/restassured/internal/path/xml/XmlRenderer.groovy
index 0668f465..222deb56 100644
--- a/xml-path/src/main/groovy/io/restassured/internal/path/xml/XmlRenderer.groovy
+++ b/xml-path/src/main/groovy/io/restassured/internal/path/xml/XmlRenderer.groovy
@@ -17,8 +17,8 @@
 
 package io.restassured.internal.path.xml
 
-import groovy.xml.slurpersupport.GPathResult
 import groovy.xml.StreamingMarkupBuilder
+import groovy.xml.slurpersupport.GPathResult
 
 class XmlRenderer {
 
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/XmlPath.java b/xml-path/src/main/java/io/restassured/path/xml/XmlPath.java
index ec48b5f8..1689299a 100644
--- a/xml-path/src/main/java/io/restassured/path/xml/XmlPath.java
+++ b/xml-path/src/main/java/io/restassured/path/xml/XmlPath.java
@@ -18,8 +18,8 @@ package io.restassured.path.xml;
 
 import groovy.lang.GroovyRuntimeException;
 import groovy.xml.XmlSlurper;
-import groovy.xml.slurpersupport.GPathResult;
 import groovy.xml.XmlUtil;
+import groovy.xml.slurpersupport.GPathResult;
 import io.restassured.internal.common.assertion.AssertParameter;
 import io.restassured.internal.common.path.ObjectConverter;
 import io.restassured.internal.path.xml.*;
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-osgi/src/test/java/io/restassured/test/osgi/options/RestAssuredPaxExamOptions.java b/examples/rest-assured-itest-java-osgi/src/test/java/io/restassured/test/osgi/options/RestAssuredPaxExamOptions.java
index 42099cd3..f58f9b91 100644
--- a/examples/rest-assured-itest-java-osgi/src/test/java/io/restassured/test/osgi/options/RestAssuredPaxExamOptions.java
+++ b/examples/rest-assured-itest-java-osgi/src/test/java/io/restassured/test/osgi/options/RestAssuredPaxExamOptions.java
@@ -4,10 +4,7 @@ import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.options.DefaultCompositeOption;
 import org.ops4j.pax.exam.options.libraries.JUnitBundlesOption;
 
-import static org.ops4j.pax.exam.CoreOptions.bundle;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
+import static org.ops4j.pax.exam.CoreOptions.*;
 
 public class RestAssuredPaxExamOptions {
 
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/CookieITest.java b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/CookieITest.java
index 4761f8de..62142a27 100644
--- a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/CookieITest.java
+++ b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/CookieITest.java
@@ -58,7 +58,7 @@ public class CookieITest extends WithJetty {
 
     @Test
     public void supportsDetailedCookieMatchingUsingDsl() {
-        expect().cookie("cookie1", detailedCookie().maxAge(1234567).path(Matchers.notNullValue()))
+        expect().cookie("cookie1", detailedCookie().maxAge(1234567L).path(Matchers.notNullValue()))
                 .when().get("/multiCookie");
     }
 
@@ -67,7 +67,7 @@ public class CookieITest extends WithJetty {
         given()
                 .get("/multiCookie")
                 .then()
-                .cookie("cookie1", detailedCookie().maxAge(1234567).path(Matchers.notNullValue()));
+                .cookie("cookie1", detailedCookie().maxAge(1234567L).path(Matchers.notNullValue()));
     }
 
     @Test
@@ -199,7 +199,7 @@ public class CookieITest extends WithJetty {
         assertThat(secondCookie.getValue(), equalTo("cookieValue2"));
         assertThat(secondCookie.getDomain(), equalTo("localhost"));
         assertThat(secondCookie.getPath(), equalTo("/"));
-        assertThat(secondCookie.getMaxAge(), is(1234567));
+        assertThat(secondCookie.getMaxAge(), is(1234567L));
         assertThat(secondCookie.isSecured(), is(true));
     }
 
diff --git a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/ErrorMessageITest.java b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/ErrorMessageITest.java
index b862478d..7fa73e3c 100644
--- a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/ErrorMessageITest.java
+++ b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/ErrorMessageITest.java
@@ -92,6 +92,28 @@ public class ErrorMessageITest extends WithJetty {
                 get("/lotto");
     }
 
+    @Test public void
+    error_message_look_ok_with_on_fail_message() {
+        exception.expect(AssertionError.class);
+        exception.expectMessage("2 expectations failed.\n" +
+                "JSON path lotto.lottoId doesn't match.\n" +
+                "Expected: a value less than <2>\n" +
+                "  Actual: <5>\n" +
+                "\n" +
+                "JSON path lotto.winning-numbers doesn't match.\n" +
+                "Expected: a collection containing <21>\n" +
+                "  Actual: <[2, 45, 34, 23, 7, 5, 3]>\n" +
+                "\n" +
+                "On fail message: An additional information to find the cause of the error");
+
+        expect().
+                body("lotto.lottoId", lessThan(2)).
+                body("lotto.winning-numbers", hasItem(21)).
+                onFailMessage("An additional information to find the cause of the error").
+                when().
+                get("/lotto");
+    }
+
     @Test public void
     error_message_with_failed_xpath_expected_looks_ok() {
         exception.expect(AssertionError.class);
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..08fb2db3 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
@@ -35,14 +35,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 +50,7 @@ public class ObjectMappingITest extends WithJetty {
     }
 
     @Test
-    public void mapResponseToObjectUsingJacksonWhenNoContentTypeIsDefined() throws Exception {
+    public void mapResponseToObjectUsingJacksonWhenNoContentTypeIsDefined() {
         final Message message =
                 expect().
                         defaultParser(JSON).
@@ -61,14 +61,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 +76,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 +84,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 +93,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 +111,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 +129,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 +138,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 +152,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 +161,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 +169,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 +199,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 +208,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 +217,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 +226,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/SpecificationBuilderITest.java b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/SpecificationBuilderITest.java
index 0ec7e1c5..a64fd0bb 100644
--- a/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/SpecificationBuilderITest.java
+++ b/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/SpecificationBuilderITest.java
@@ -19,7 +19,6 @@ package io.restassured.itest.java;
 import io.restassured.RestAssured;
 import io.restassured.builder.RequestSpecBuilder;
 import io.restassured.builder.ResponseSpecBuilder;
-import io.restassured.config.HeaderConfig;
 import io.restassured.http.Cookies;
 import io.restassured.itest.java.support.WithJetty;
 import io.restassured.specification.RequestSpecification;
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;
diff --git a/modules/spring-mock-mvc/src/test/java/io/restassured/module/mockmvc/AcceptTest.java b/modules/spring-mock-mvc/src/test/java/io/restassured/module/mockmvc/AcceptTest.java
index 90ec6432..1b063096 100644
--- a/modules/spring-mock-mvc/src/test/java/io/restassured/module/mockmvc/AcceptTest.java
+++ b/modules/spring-mock-mvc/src/test/java/io/restassured/module/mockmvc/AcceptTest.java
@@ -20,14 +20,15 @@ import io.restassured.config.EncoderConfig;
 import io.restassured.http.ContentType;
 import io.restassured.module.mockmvc.http.GreetingController;
 import io.restassured.module.mockmvc.intercept.MockHttpServletRequestBuilderInterceptor;
-import java.util.ArrayList;
-import java.util.List;
 import org.junit.Test;
 import org.powermock.reflect.Whitebox;
 import org.springframework.http.MediaType;
 import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
 import org.springframework.util.MultiValueMap;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import static org.assertj.core.api.Assertions.assertThat;
 
 public class AcceptTest {
diff --git a/modules/spring-web-test-client/src/test/java/io/restassured/module/webtestclient/setup/HeaderController.java b/modules/spring-web-test-client/src/test/java/io/restassured/module/webtestclient/setup/HeaderController.java
index 1051d7ab..2b91f18e 100644
--- a/modules/spring-web-test-client/src/test/java/io/restassured/module/webtestclient/setup/HeaderController.java
+++ b/modules/spring-web-test-client/src/test/java/io/restassured/module/webtestclient/setup/HeaderController.java
@@ -16,13 +16,14 @@
 
 package io.restassured.module.webtestclient.setup;
 
-import java.util.Map;
 import org.springframework.http.server.reactive.ServerHttpRequest;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestHeader;
 import org.springframework.web.bind.annotation.RestController;
 import reactor.core.publisher.Mono;
 
+import java.util.Map;
+
 import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
 
 @RestController
diff --git a/modules/spring-web-test-client/src/test/java/io/restassured/module/webtestclient/setup/PutController.java b/modules/spring-web-test-client/src/test/java/io/restassured/module/webtestclient/setup/PutController.java
index 40fbb9a4..c438b7da 100644
--- a/modules/spring-web-test-client/src/test/java/io/restassured/module/webtestclient/setup/PutController.java
+++ b/modules/spring-web-test-client/src/test/java/io/restassured/module/webtestclient/setup/PutController.java
@@ -17,18 +17,12 @@
 package io.restassured.module.webtestclient.setup;
 
 import org.springframework.http.codec.multipart.FilePart;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RequestPart;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import reactor.core.publisher.Mono;
 
 import java.util.concurrent.atomic.AtomicLong;
 
-import static org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE;
-import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
-import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE;
+import static org.springframework.http.MediaType.*;
 
 @RestController
 public class PutController {
diff --git a/rest-assured/src/test/groovy/io/restassured/ParameterMapBuilderTest.groovy b/rest-assured/src/test/groovy/io/restassured/ParameterMapBuilderTest.groovy
index e8805f90..6d203588 100644
--- a/rest-assured/src/test/groovy/io/restassured/ParameterMapBuilderTest.groovy
+++ b/rest-assured/src/test/groovy/io/restassured/ParameterMapBuilderTest.groovy
@@ -21,8 +21,6 @@ package io.restassured
 import io.restassured.authentication.NoAuthScheme
 import io.restassured.internal.RequestSpecificationImpl
 import io.restassured.internal.log.LogRepository
-import io.restassured.specification.Argument
-import io.restassured.specification.RequestSpecification
 import org.junit.Before
 import org.junit.Test
 
diff --git a/rest-assured/src/test/java/io/restassured/assertion/CookieMatcherTest.java b/rest-assured/src/test/java/io/restassured/assertion/CookieMatcherTest.java
index 9ba99b75..ff8b24d2 100644
--- a/rest-assured/src/test/java/io/restassured/assertion/CookieMatcherTest.java
+++ b/rest-assured/src/test/java/io/restassured/assertion/CookieMatcherTest.java
@@ -50,25 +50,25 @@ public class CookieMatcherTest {
         assertEquals("12345", sprintCookie.getValue());
         assertEquals(".test.com", sprintCookie.getDomain());
         assertEquals("/", sprintCookie.getPath());
-        assertEquals(1209600, sprintCookie.getMaxAge());
+        assertEquals(1209600L, sprintCookie.getMaxAge());
         assertEquals(false, sprintCookie.isSecured());
         assertEquals(false, sprintCookie.isHttpOnly());
 
         Cookie cookieWithZeroMaxAge = result.get("COOKIE_WITH_ZERO_MAX_AGE");
-        assertEquals(0, cookieWithZeroMaxAge.getVersion());
+        assertEquals(0L, cookieWithZeroMaxAge.getVersion());
         assertEquals("1234", cookieWithZeroMaxAge.getValue());
         assertEquals(".test.com", cookieWithZeroMaxAge.getDomain());
         assertEquals("/", cookieWithZeroMaxAge.getPath());
-        assertEquals(0, cookieWithZeroMaxAge.getMaxAge());
+        assertEquals(0L, cookieWithZeroMaxAge.getMaxAge());
         assertEquals(false, cookieWithZeroMaxAge.isSecured());
         assertEquals(false, cookieWithZeroMaxAge.isHttpOnly());
 
         Cookie cookieWithNegativeMaxAge = result.get("COOKIE_WITH_NEGATIVE_MAX_AGE");
-        assertEquals(0, cookieWithNegativeMaxAge.getVersion());
+        assertEquals(0L, cookieWithNegativeMaxAge.getVersion());
         assertEquals("123456", cookieWithNegativeMaxAge.getValue());
         assertEquals(".test.com", cookieWithNegativeMaxAge.getDomain());
         assertEquals("/", cookieWithNegativeMaxAge.getPath());
-        assertEquals(-1, cookieWithNegativeMaxAge.getMaxAge());
+        assertEquals(-1L, cookieWithNegativeMaxAge.getMaxAge());
         assertEquals(false, cookieWithNegativeMaxAge.isSecured());
         assertEquals(false, cookieWithNegativeMaxAge.isHttpOnly());
 
diff --git a/rest-assured/src/test/java/io/restassured/http/CookieTest.java b/rest-assured/src/test/java/io/restassured/http/CookieTest.java
index 237c2b3a..df9f6b9f 100644
--- a/rest-assured/src/test/java/io/restassured/http/CookieTest.java
+++ b/rest-assured/src/test/java/io/restassured/http/CookieTest.java
@@ -25,9 +25,9 @@ public class CookieTest {
     @Test public void
     can_use_negative_values_as_max_age() {
         // When
-        Cookie cookie = new Cookie.Builder("hello", "world").setMaxAge(-3600).build();
+        Cookie cookie = new Cookie.Builder("hello", "world").setMaxAge(-3600L).build();
 
         // Then
-        assertThat(cookie.getMaxAge()).isEqualTo(-3600);
+        assertThat(cookie.getMaxAge()).isEqualTo(-3600L);
     }
 }
\ No newline at end of file