jetty.project
jetty.project copied to clipboard
Running embedded jetty in weld-junit5 context fails after upgrading to Jetty 12
Jetty version(s)
Jetty 12.0.13
Jetty Environment
ee10
Java version/vendor
openjdk 21.0.2 2024-01-16 LTS
OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode, sharing)
OS type/version
Microsoft Windows [Version 10.0.19045.4780]
Description Currently upgrading from Jetty 10 to Jetty 12, I'm unable to get the integration tests running again. I've set up a reproducer repo with different branches for you to test out:
- Working solution (with JNDI) in Jetty 10: https://github.com/jansohn/weld-junit5-embedded-jetty/tree/jndi-jetty10
- Non-working solution (with JNDI) in Jetty 12: https://github.com/jansohn/weld-junit5-embedded-jetty/tree/jndi
- Non-working solution (without JNDI) in Jetty 12: https://github.com/jansohn/weld-junit5-embedded-jetty/tree/main
I'd like to get rid of all the hacks and workarounds we used to get it running JNDI on Jetty 10 but I'm also happy for a (short-term) solution with the way we have done it in the past.
How to reproduce? Checkout repo and run the different branches (main, jndi and jndi-jetty10) with:
mvn clean verify
Output line 2024-09-18 17:00:31,774 INFO [main] com.test.ApplicationContextListener: web listener injected property: initialized! should be visible indicating a successful start-up.