Quarkus not always initialising web servlets on startup
See original GitHub issueDescribe the bug
I have a problem with my Quarkus application, where my web servlets are not always initialising at startup.
When one does a maven clean and package, the application is either built with the code to start the servlets or not. If the application at startup initialises the servlets, it will do so every time it starts and vice versa. The only way to resolve the issue is to rebuild the application until it works witch leads me to believe that the problem lies in the quarkus-maven-plugin.
The problem started after upgrading to Qaurkus 2.0.0.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a
or ver
No response
Output of java -version
openjdk 17 2021-09-14 LTS OpenJDK Runtime Environment Zulu17.28+13-CA (build 17+35-LTS) OpenJDK 64-Bit Server VM Zulu17.28+13-CA (build 17+35-LTS, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.4.0-Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Hi,
I will try and create one for you.
Regards
Eddie
From: Georgios Andrianakis @.> Reply to: quarkusio/quarkus @.> Date: Monday, 01 November 2021 at 08:00 To: quarkusio/quarkus @.> Cc: Eddie Carpenter @.>, Author @.***> Subject: Re: [quarkusio/quarkus] Quarkus not always initialising web servlets on startup (Issue #21118)
Do you have an example application you can attach that exhibits this behavior?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
What is happening is that your
web.xml
file is not being picked up because it’s in the wrong directory (it should beMETA-INF/web.xml
) and instead the web fragments (META-INF/web-fragment.xml
) from the dependencies are being used. Now, due to a bug, the way to those fragments are used is not predicable so sometimes the fragment fromorg.zkoss.zk:zkwebfragment
is used and sometimes not.