cloudfoundry / cloudfoundry/cf-java-client
Integration tests fail: test-service-broker.jar incompatible with java-buildpack v5 (JDK 17 default)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 334
- Fork
- 319
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
On March 20-21, 2026, the java-buildpack main branch was updated to v5.0.1, which defaults to JDK 17 (up from JDK 8 in v4.x).
The integration tests hardcode buildpack("https://github.com/cloudfoundry/java-buildpack.git") in ApplicationUtils.java:230, so they now get JDK 17. The bundled test-service-broker.jar is a Spring Boot 1.5.16 app (built ~2018) that relies on CGLIB reflective access incompatible with JDK 17's module system. The app crashes on startup with InaccessibleObjectException, causing DelayTimeoutException and failing all tests that depend on serviceBrokerId.
Workaround
Add --add-opens flags to the service broker environment in ServiceBrokerUtils.pushServiceBrokerApplication():
env.put("JAVA_OPTS",
"--add-opens java.base/java.lang=ALL-UNNAMED"
+ " --add-opens java.base/java.io=ALL-UNNAMED");
Potential longer-term fixes
- Rebuild test-service-broker.jar with a modern Spring Boot version
- Pin the buildpack to a version tag or use the system buildpack instead of tracking main
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in integration-test/src/test/java/org/cloudfoundry/ServiceBrokerUtils.java, in pushServiceBrokerApplication(), quindi esamina ApplicationUtils.java e il contesto di test-service-broker.jar incluso. Esegui i test di integrazione che dipendono da serviceBrokerId e conferma che il broker si avvii con java-buildpack v5/JDK 17 senza DelayTimeoutException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, spring-boot
- Ambito
- backend, testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- Mezza giornata
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 74/100