Skip to content

[Investigation] SDK javax.xml.bind references conflict with Jakarta EE 9+ class loading #1582

@galesky-a

Description

@galesky-a

Problem statement

This issue outlines a class-loading conflict between the adyen-java-api-library and Java platforms built on the Jakarta EE 9+ specification.

1. Overview

The core issue is a package namespace discrepancy. The SDK's compiled bytecode references classes in the javax.xml.bind.* namespace. Jakarta EE 9+ platforms (e.g., Tomcat 10+, Spring 6+) provide these classes only in the jakarta.xml.bind.* namespace. ref

This mismatch will likely cause a NoClassDefFoundError at runtime when the SDK is deployed on a Jakarta EE 9+ stack.

2. Technical Analysis

SDK State:

  • Search confirms that the SDK source contains 228 import statements for javax.xml.bind.. As a result, the compiled .jar artifact contains hard references to this javax. namespace.

  • The Jakarta EE 9 specification, which is the baseline for Tomcat 10+ and Spring 6+, introduced a breaking change were all Java EE API packages were moved from the javax.* namespace to the jakarta.* namespace. This means, for example, javax.xml.bind.JAXBException no longer exists on these platforms. Its successor is jakarta.xml.bind.JAXBException.

Proposed solution

The current SDK build will not operate on Jakarta EE 9, 10, or 11 platforms.

This blocks all users and partners from migrating their applications to Spring 6 (Spring Boot 3) or Tomcat 10+.

A clear strategy for migrating and versioning the SDK will be required to support these platforms.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Confirmed bugIndicates that issue has been confirmed to be a bug by an Adyen developerneeds response

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions