Skip to content

Bug Report: Memory leak when using Jersey clientΒ #7054

Open
@albanf

Description

@albanf

Brief Summary

When using Jersey and Jackson to deserialize XML, any change to the configuration of the WebTarget causes a memory leak.

I suspect this was caused by FISH-6432 Applications Take Longer To Deploy on JDK 17) (payara/patched-src-hk2@3.0.1.payara-p1...3.0.1.payara-p2), since it works with prior versions (as well as HK2 3.0.3, before 3.0.4 that includes the same patch).

Also posted in Jersey and HK2 projects: eclipse-ee4j/jersey#5796, eclipse-ee4j/glassfish-hk2#1126.

Expected Outcome

Resources are cleaned up as expected

Current Outcome

Resources are not cleaned up

Reproducer

Here is a sample project to reproduce the issue. I tested with several versions of Jersey/HK2, including the ones used in Payara 6.2024.10 (Jersey 3.1.7.payara-p1 and HK2 3.0.1.payara-p4)
jersey-memory-leak.zip

Operating System

Ubuntu

JDK Version

Temurin 21.0.1

Payara Distribution

Payara Server Full Profile

Metadata

Metadata

Assignees

Labels

Status: AcceptedConfirmed defect or accepted improvement to implement, issue has been escalated to Platform DevType: BugLabel issue as a bug defect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions