-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report: EAR inter-WAR CDI Isolation Failure with 6.2025.2-6 #7233
Comments
Awesome, thank you |
Any chance I can get the source code for the reproducer? It's much more difficult to deal with the pre-built binary, leaves a lot of guesses. Thank you |
Hi, I was able to reproduce the problem, however it's very very difficult to make progress without the source code for the reproducer. There are no Maybe it has something to do, it'll help me debug this. Thank you |
Please find attached |
Actually there are |
I'll try it. Actually, I tried to create my own reproducer, following your layout, but it didn't reproduce, so I will try again |
I found the issue. It's in Jax-RS integration modules. |
You are, definitively! 🦸♂ I even have big hopes that you might be the one solving my next issue... #7234 😃 |
Don't want to get your hopes up for #7234 Markus. My plan for the year is to finish #7165 and take a long Payara vacation, probably for the rest of 2025. #7165 was supposed to be done in December, and it's now almost mid-March and it's nowhere near done. After that long break, I plan to work on Apache Shiro, FlowLogix / Jakarta EE Starter, or something completely different to maybe make me some $$ I am sure I will be involved in some Payara work, but not much / primary / priority, unless they make me an offer I can't refuse :) |
Didn't want to put you under pressure, Lenny, just wanted to express my gratitude for your great work, which I really do appreciate. Take all the time you need, and be assured, you will be very welcome if / once you're back at Payara! |
Wow, great! 🤩 Will test it ASAP. Unfortunately I am out of office today, so it might need until Monday to give feedback. |
Did just a very quick test, but as far as I can tell, the original application is not failing anymore. The bug seems to be gone. Will do an intensive test on Monday, but I do not expect it to fail. Good job! 👍 |
Correcting myself. No need for deeper tests on Monday. Just found a simple trick to let our business application test itself completely (like a macro). So I can already give the final answer: Your fix definitively works like a charm! 🚀 |
System test? End to end test? That's great. Glad I could help. |
What really helped is the reproducer. I could have been looking for a bug in WAR/EAR/ CDI integration until I was blue in the face when the bug was really an old Jax-RS/CDI integration bug. |
I performed an end-to-end test of the real business application with real data. Due to its use case, a single REST request invokes virtually 99% of all endpoints in turn, rendering a compount response. Therefore I can safely say: All is fine now! :-) |
It took me 16 hours to set it up, but it was worth it. I had to strip from an EAR approx. 50 WARs containing hundres of endpoints to finally find those two WARs that I have to keep... 😅 |
Wow. So glad it worked out |
Happy that you found a solution! 😄 |
Brief Summary
The existence of one WAR within an EAR prevents CDI provider lookup within a second WAR in the same EAR.
Both WARs are not interconnected and do not share common libraries (at least they should not, as CDI separation is what 6.2025.2 pretends to fix).
As soon as the other WAR is removed from the EAR, CDI provider lookup succeeds!
Worked well in 6.2025.1, fails since 6.2025.2 (up to and including 6.2025.2-6).
This bug report is a spin-off from the discussion in #7201.
Expected Outcome
Dependency Injection works well in 6.2025.2-6, i. e. CDI lookup within WAR 1 does not interfer with CDI lookup in WAR 2, even when both WARs are found within the same EAR.
Current Outcome
If both WARs are registered as web-applications in application.xml of EAR, CDI lookup in WAR 1 does not work (will not find provider which is also contained in WAR 1).
If WAR 2 is not registered as a web-application in application.xml of EAR, CDI lookup in WAR 1 works well (finds provider).
Reproducer
reproducer.zip
Unpacking the ZIP provides the reproducer EAR.
This will produce HTTP status 500, and the error message is found in
server.log
:Then remove this
<webmodule>
section......from
META-INF\application.xml
, undeploy and deploy again, and runcurl
again. Now curl returns status 200 OK, which proofs that somehow the isolation between both WARs is broken, because there is actually no interconnection between both WARs in this EAR (at least nothing that is intended). 😲Operating System
Windows 10 Pro
JDK Version
Zulu JDK 17
Payara Distribution
Payara Server Full Profile
The text was updated successfully, but these errors were encountered: