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-maven-plugin:build keeps stale classloaders

See original GitHub issue

As of Quarkus 1.11.0.Final, the build mojo of quarkus-maven-plugin keeps stale class loaders of deployment artifacts built from the same source tree with the same daemon.

Generic steps to reproduce:

  1. Find some simple itest in the quarkus, e.g. jsonb
  2. Break something in some deployment module used by the test, e.g. fully remove the body of io.quarkus.jsonb.deployment.JsonbProcessor.build(BuildProducer<ReflectiveClassBuildItem>, BuildProducer<NativeImageResourceBundleBuildItem>, BuildProducer<ServiceProviderBuildItem>, BuildProducer<AdditionalBeanBuildItem>, CombinedIndexBuildItem) method.
  3. Rebuild quarkus-jsonb-deployment to make sure that it is installed
  4. Build the test with a fresh mvnd
cd integration-tests/jsonb
mvnd --stop
mvnd clean verify -Dnative

The test should fail, because the JsonbProcessor is broken 5. Revert the breakage in io.quarkus.jsonb.deployment.JsonbProcessor.build(BuildProducer<ReflectiveClassBuildItem>, BuildProducer<NativeImageResourceBundleBuildItem>, BuildProducer<ServiceProviderBuildItem>, BuildProducer<AdditionalBeanBuildItem>, CombinedIndexBuildItem) method, 6. Rebuild quarkus-jsonb-deployment with mvnd to make sure that it is installed 7. Rebuild the test project

cd integration-tests/jsonb
mvnd --stop
mvnd clean verify -Dnative

Expected: the test should pass, because the JsonbProcessor is fixed now Actual: the test still fails, because the quarkus-maven-plugin classloader is cached and it contains an outdated version of JsonbProcessor

Workaround: manually kill the daemon when any of the deployment modules was changed.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
famodcommented, Jan 15, 2021

@ppalaga So would you suggest to stop using mvnd for Quarkus for now?

What if mvnd had a blacklist of plugins that must not be cached? This might be a workaround for plugins that are known to cause trouble and take some time to be adjusted?

0reactions
gnodetcommented, Jan 18, 2021

@ppalaga I can’t reproduce with quarkus master and mvnd 0.3.0. The changes seem to be correctly picked up by the daemon when running the test after rebuilding the deployment module.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Randomly failing builds · Issue #25677 · quarkusio/quarkus
Our project has nightly build to verify that everything keeps working. Our nightly build fails randomly (not always) with following exception ...
Read more >
Building applications with Maven - Quarkus
The Quarkus classloaders will be properly closed in the build goal of the quarkus-maven-plugin . However, if the build fails in between the...
Read more >
Maven compiler plugin always detecting a set of sources as ...
I am seeing the same kind of problem. Using 3.0 doesn't help in my case, though. I just keep using 3.1 and set...
Read more >
chore(deps): update dependency io.quarkus:quarkus ... - GitLab
chore(deps): update dependency io.quarkus:quarkus-maven-plugin to v2.
Read more >
Build even faster Quarkus applications with fast-jar
The Java class loader dynamically loads Java classes into the Java Virtual Machine (JVM) in ... mvn io.quarkus:quarkus-maven-plugin:1.11.6.
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