[Bug]: Switch docker-java transport to httpclient5 to avoid Java 24 warning
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, java
- Domain
- backend, testing-qa
Research direction
The issue identifies the Core module but no files or tests. Start by tracing the Core module's docker-java transport dependency and compare the proposed httpclient5 transport; done means Java 24 no longer emits the JNA restricted-access warning while the existing Core behavior remains working.
Written by the indexing model from the issue text.
Description
Module
Core
Testcontainers version
1.20.6
Using the latest Testcontainers version?
Yes
Host OS
Win11 x64
Host Arch
x64
Docker version
Client:
Version: 28.0.4
API version: 1.48
Go version: go1.23.7
Git commit: b8034c0
Built: Tue Mar 25 15:07:48 2025
OS/Arch: windows/amd64
Context: desktop-linux
Server: Docker Desktop 4.40.0 (187762)
Engine:
Version: 28.0.4
API version: 1.48 (minimum version 1.24)
Go version: go1.23.7
Git commit: 6430e49
Built: Tue Mar 25 15:07:22 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.26
GitCommit: 753481ec61c7c8955a23d6ff7bc8e4daed455734
runc:
Version: 1.2.5
GitCommit: v1.2.5-0-g59923ef
docker-init:
Version: 0.19.0
GitCommit: de40ad0
What happened?
When using Java 24, the JNA transitive dependency of the zerodep transport of docker-java produces the following message:
Short of requiring every user of testcontainers-java to add a JVM arg, there is no other option but to switch the docker-java transport to get rid of this warning. Httpclient5 would be a good candidate.
Relevant log output
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.sun.jna.Native in an unnamed module (file:/X:/gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.13.0/1200e7ebeedbe0d10062093f32925a912020e747/jna-5.13.0.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
Additional Information
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 2k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 11
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from testcontainers/testcontainers-java
-
[Bug]: WaitStrategyTarget Handles Multiple Ports Differently to DocumentationPossibly taken @suvvvv claimed this 2 days ago. Opentype/bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
testcontainers/testcontainers-java#12196 ·
Maintainers usually reply within 1 day
-
[Bug]: DockerImageName treats uppercase registry names as repository pathsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
testcontainers/testcontainers-java#12186 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: withStartupTimeout() changes the startup timeout of all containers that use the default wait strategyPossibly taken @aymenjamaaoui claimed this 18 days ago. Opentype/bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
testcontainers/testcontainers-java#12171 · 1 comment ·
Maintainers usually reply within 1 day
-
[Enhancement]: Document why singleton containers are required under Spring's test context cachingPossibly taken @zakaullah075 claimed this 111 days ago. Opentype/enhancement
Difficulty 1/5 Under an hour Newbie friendliness 85/100
testcontainers/testcontainers-java#11967 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: Cannot reuse Selenium BrowserWebDriverContainers under LinuxPossibly taken @kdelay claimed this 132 days ago. Opentype/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
testcontainers/testcontainers-java#11941 ·
Maintainers usually reply within 1 day
All issues in testcontainers/testcontainers-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
erkamyaman/rust-anything#1381 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
java-native-access/jna#1757 ·