question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quarkus not always initialising web servlets on startup

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
eddiecarpentercommented, Nov 1, 2021

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.

0reactions
geoandcommented, Nov 2, 2021

What is happening is that your web.xml file is not being picked up because it’s in the wrong directory (it should be META-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 from org.zkoss.zk:zkwebfragment is used and sometimes not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application Initialization and Termination - Quarkus
In the JVM mode, there is no real difference, except that StartupEvent is always fired after @Initialized(ApplicationScoped.class) and ShutdownEvent is ...
Read more >
Creating Your First Application - Quarkus
Bootstrapping the project. To create a Gradle project, add the --gradle or --gradle-kotlin-dsl option. For more information about how to install the Quarkus...
Read more >
Writing Your Own Extension - Quarkus
Quarkus extensions add a new developer focused behavior to the core offering, and consist of two distinct parts, buildtime augmentation and runtime ...
Read more >
Introduction to Contexts and Dependency Injection - Quarkus
This is a scope annotation. It tells the container which context to associate the bean instance with. In this particular case, a single...
Read more >
Guides - Latest - Quarkus
Hardcoded values in your code is a no go (even if we all did it at some ... This guide explains how your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found