Skip to content

JakartaEE and Java 21 issues #1928

Description

@alexandernajafi

I'm upgrading to JakartaEE and Java21 and is running into issues. I'm imorting AHC version 3.0.0.Beta3 with

implementation 'org.asynchttpclient:async-http-client:3.0.0.Beta3'

But I'm getting errors related to jakarta.activation. When I try to add a body part to a request builder, I'm getting an error:

java.lang.ArrayStoreException: arraycopy: element type mismatch: can not cast one of the elements of java.lang.Object[] to the type of the destination array, jakarta.activation.MimeTypeRegistry

It works fine when I'm adding a StringPart, but this is when I try to add a InputStreamPart in the same requestBuilder.

If I import angus-activation instead, it seems to work, but it should really not be needed.

    implementation('org.asynchttpclient:async-http-client:3.0.0.Beta3') {
        exclude group: 'com.sun.activation', module: 'jakarta.activation'
    }
    implementation 'org.eclipse.angus:angus-activation:2.0.1'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions