Chapter 30. Migration Guide
Prev |  | Next

Links: Table of Contents | Single HTML

# Chapter 30. Migration Guide

## 30.1. Migrating from Jersey 2.32+ to 3.0.x.

### 30.1.1. Breaking Changes

- The most fundamental change in Jersey 3.0.0 and later is namespace change. Since Jakarta EE 9 the `jakarta.` namespace is introduced as a replacement for javax namespace from Java EE.

- Some Jersey modules require higher versions of Java SE. See Section 2.1, “Java SE Compatibility”.

- Examples and tests are reduced in quantity (so you probably will not find all those examples which were available in the 2.32 version).

- ServerProperties.UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE is by default `true`.

### 30.1.2. Removed deprecated APIs

- Jackson 1 support was removed.

### 30.1.3. Application servers for Jersey

Note that only a few servers support Jakarta EE 9 compatible Servlet API and they are tested with Jersey. Those are: `GlassFish 6`, `Grizzly 3`, `Jetty 11 (JDK 11+ required)`, `Payara 6`, and `Tomcat 10`.

## 30.2. Migrating from Jersey 3.0.x to 3.1.5.

### 30.2.1. Breaking Changes

- Jersey 3.1.0+ is the implementation of Jakarta RESTful WebServices 3.1, which is part of Jakarta EE 10. Jakarta EE 10 defines the minimum JDK 11 requirement and hence Jersey no longer supports JDK 8.

  Some Jersey modules require higher versions of Java SE. See Section 2.1, “Java SE Compatibility”.

- Since Jersey 3.1.0+ the `getRequestHeader(String name)` method of the `ClientRequest` class returns NULL (instead of an empty List) in case if the specified header does not exist.

### 30.2.2. @ApplicationPath Annotation Support

Jersey 3.1 supports `@ApplicationPath` annotation by every container, not only the `Servlet` container. This can affect tests, as well as deployments to containers where the annotation used to be ignored by previous versions of Jersey.

### 30.2.3. Jetty Modules

- Jersey 3.0.x, and 3.1.0 - 3.1.3 Jetty modules (jersey-jetty-connector, jersey-container-jetty-http, jersey-container-jetty-servlet, jersey-test-framework-provider-jetty) are based on Jetty 11, which is Jakarta EE 9 related.

- Jersey 3.1.4 modules use Jetty 12 which is Jakarta EE 10 related (as well as Jersey 3.1.x). Jetty 12 dependencies use modules names different from Jetty 11.

### 30.2.4. Migrating from Jersey 3.1.3 to 3.1.4

#### 30.2.4.1. Changes in Jackson

Jersey 3.1.4 starts to support Jackson 2.15 which comes with default limitations for the length of parsed text, numbers, and nesting depth. Jersey keeps the Jackson default value, but it allows to override the maximum length of parsed text using the MessageProperties.JSON_MAX_STRING_LENGTH property if needed.

Prev |  | Next
Chapter 29. Building and Testing Jersey | Home | Appendix A. Configuration Properties