Skip to content

Fix test-service-broker crash on JDK 17 by adding --add-opens flags#1345

Draft
jorbaum wants to merge 1 commit intocloudfoundry:mainfrom
jorbaum:buildpack-5-0-0-workaround
Draft

Fix test-service-broker crash on JDK 17 by adding --add-opens flags#1345
jorbaum wants to merge 1 commit intocloudfoundry:mainfrom
jorbaum:buildpack-5-0-0-workaround

Conversation

@jorbaum
Copy link

@jorbaum jorbaum commented Mar 23, 2026

Workaround for #1344 .

The test-service-broker.jar (Spring Boot 1.5.16 / Spring Framework 4.3.19) uses CGLIB proxying which requires reflective access to java.lang.ClassLoader.defineClass(). JDK 17's module system blocks this, causing the app to crash on startup with
InaccessibleObjectException and all ApplicationsTest methods to fail with DelayTimeoutException during serviceBrokerId bean creation.

Creating this as a draft as this is a workaround only to some parts of the integration tests work again.

The test-service-broker.jar (Spring Boot 1.5.16 / Spring Framework
4.3.19) uses CGLIB proxying which requires reflective access to
java.lang.ClassLoader.defineClass(). JDK 17's module system blocks
this, causing the app to crash on startup with
InaccessibleObjectException and all ApplicationsTest methods to fail
with DelayTimeoutException during serviceBrokerId bean creation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant