Search code examples
javamavenintellij-ideamicroservicesquarkus

javax.enterprise.inject.spi.DeploymentException after quarkus version update to 3.0+


I updated my quarkus version from 2.9.2.Final to 3.0.4.Final. Quarkus 2 was based on Jakarta EE 8. Quarkus 3 is based on Jakarta EE 10.

The most visible change is that the javax.* packages from Jakarta EE have been moved to jakarta.. This change requires changing any source code and dependency and its transitive dependencies that rely on the javax. packages.

After running the migration to version 3.0.4.Final I get the the following exception:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.0.4.Final:build (default) on project : Execution default of goal io.quarkus.platform:quar kus-maven-plugin:3.0.4.Final:build failed: A required class was missing while executing io.quarkus.platform:quarkus-maven-plugin:3.0.4.Final:build: javax/enterprise/inject/spi/DeploymentException

I tried removing .m2/repository and tried installing everything again but that did not help. I also tried to exclude javax.* as transitive dependency but that did not help either.

Here is a bit of a stack trace:

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.9.4:build (default) on project <redacted>: Execution default of goal io.quarkus.platform:quarkus-maven-plugin:3.9.4:build failed: A required class 
was missing while executing io.quarkus.platform:quarkus-maven-plugin:3.9.4:build: javax/enterprise/inject/spi/DeploymentException
[ERROR] -----------------------------------------------------
[ERROR] realm =    extension>io.quarkus.platform:quarkus-maven-plugin:3.9.4
[ERROR] strategy = 
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

Solution

  • I had a quarkus-amazon-s3 dependency in my pom.xml:

    <dependency>
        <groupId>io.quarkiverse.amazonservices</groupId>
        <artifactId>quarkus-amazon-s3</artifactId>
        <version>1.4.0</version>
    </dependency>
    

    I updated its version which resolved my issue:

    <dependency>
        <groupId>io.quarkiverse.amazonservices</groupId>
        <artifactId>quarkus-amazon-s3</artifactId>
        <version>2.14.0</version>
    </dependency>