quarkus: Upgrade from 2.6.1 to 2.8.0 results in "Failed to start quarkus"

Describe the bug

I developed with Quarkus 2.6.1. All worked fine. I could run and test the application, without any error.

Then, when I tried to upgrade to latest version 2.8.0, at start, I got a big exception chain, resulting in “Failed to start quarkus”.

Im not able to start the application, anymore.

The exception chain starts with:

20:52:26.970 WARN [Quarkus Main Thread] io.quarkus.arc.impl.ArcContainerImpl.shutdown - An error occurred during delivery of the @BeforeDestroyed(ApplicationScoped.class) event: javax.enterprise.inject.CreationException: Synthetic bean instance for io.quarkus.scheduler.runtime.SchedulerContext not initialized yet: io_quarkus_scheduler_runtime_SchedulerContext_97d170e1550eee4afc0af065b78cda302a97674c - a synthetic bean initialized during RUNTIME_INIT must not be accessed during STATIC_INIT - RUNTIME_INIT build steps that require access to synthetic beans initialized during RUNTIME_INIT should consume the SyntheticBeansRuntimeInitBuildItem … Caused by: java.lang.RuntimeException: Failed to start quarkus**

Expected behavior

Application should run, without errors, as with 2.6.1.

Actual behavior

Application does not start.

How to Reproduce?

<quarkus.platform.version>2.8.0.Final</quarkus.platform.version>

Output of uname -a or ver

Linux LAPTOP-KBBJVPB3 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk 11.0.13 2021-10-19 LTS OpenJDK Runtime Environment Corretto-11.0.13.8.1 (build 11.0.13+8-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.13.8.1 (build 11.0.13+8-LTS, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.8.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: /usr/local/mvn Java version: 11.0.13, vendor: Amazon.com Inc., runtime: /opt/java/amazon-corretto-11.0.13.8.1-linux-x64 Default locale: en_US, platform encoding: UTF-8 OS name: “linux”, version: “5.10.60.1-microsoft-standard-wsl2”, arch: “amd64”, family: “unix”

Additional information

Issue_upgrading_from_261_to_280_results_in_Failed_to_star_quarkus.txt

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (16 by maintainers)

Most upvoted comments

Dear Aa Mansouri Thank you very much for your advice. I will gladly follow your words as soon as I work on this project again. Best regards Stephan


From: Ala Mansouri @.> Sent: Thursday, March 9, 2023 17:21 To: quarkusio/quarkus @.> Cc: Stephan Rudolph @.>; Mention @.> Subject: Re: [quarkusio/quarkus] Upgrade from 2.6.1 to 2.8.0 results in “Failed to start quarkus” (Issue #25236)

Good news here I had the same issue using quarkus 2.15.1.Final solved the problem and reproducible for me. In my case I think all the errors mentioned above are shown for me below each other when running the server. first error:

2023-03-09 17:02:36,910 WARN [io.qua.arc.impl] (Quarkus Main Thread) An error occurred during delivery of the @BeforeDestroyed(ApplicationScoped.class) event: javax.enterprise.inject.CreationException: Config root [io.quarkus.hibernate.orm.runtime.HibernateOrmRuntimeConfig] with config phase [RUN_TIME] not initialized yet. at io.quarkus.hibernate.orm.runtime.HibernateOrmRuntimeConfig_66229d6c2e25c4818b3ef00069aed3a5861e7464_Synthetic_Bean.create(Unknown Source) at io.quarkus.hibernate.orm.runtime.HibernateOrmRuntimeConfig_66229d6c2e25c4818b3ef00069aed3a5861e7464_Synthetic_Bean.get(Unknown Source) at io.quarkus.hibernate.orm.runtime.HibernateOrmRuntimeConfig_66229d6c2e25c4818b3ef00069aed3a5861e7464_Synthetic_Bean.get(Unknown Source) at io.quarkus.arc.impl.CurrentInjectionPointProvider.get(CurrentInjectionPointProvider.java:62) at io.quarkus.hibernate.orm.runtime.JPAConfig_Bean.create(Unknown Source)

And the second exception was:

2023-03-09 17:02:36,910 ERROR [io.qua.run.boo.StartupActionImpl] (Quarkus Main Thread) Error running Quarkus: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:104) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.ExceptionInInitializerError

And the third exception was related to cdi or something:

Caused by: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: io.quarkus.rest.client.reactive.runtime.RestClientReactiveCDIWrapperBase at org.jboss.resteasy.spi.metadata.ResourceBuilder.getConstructor(ResourceBuilder.java:852) at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:59) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:245) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:227) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:208) at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:192)

I was able to make it work by adding all the dependencies mentioned here in the quickstart example herehttps://github.com/quarkusio/quarkus-quickstarts/tree/main/rest-client-reactive-quickstart

I just added them at the first beginning of the deps in pom.xml then I did run the server and removed any duplicates shown just make sure to keep all the deps from the quickstart example exist I didn’t touched any of them just removed my own if there are any duplications.

here’s the pom.xml that worked for me:

<?xml version="1.0"?>

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.parentProject</groupId> <artifactId>parent-project</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <groupId>org.myProject</groupId> <artifactId>my-project</artifactId> <version>1.0.0-SNAPSHOT</version> <properties> <compiler-plugin.version>3.10.1</compiler-plugin.version> <maven.compiler.release>17</maven.compiler.release> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> <quarkus.platform.version>2.15.1.Final</quarkus.platform.version> <skipITs>true</skipITs> <surefire-plugin.version>3.0.0-M7</surefire-plugin.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>${quarkus.platform.group-id}</groupId> <artifactId>${quarkus.platform.artifact-id}</artifactId> <version>${quarkus.platform.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies>

<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-rest-client-reactive-jackson</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-resteasy-reactive</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-resteasy-reactive-jackson</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-rest-client-reactive</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-junit5</artifactId>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>io.rest-assured</groupId>
  <artifactId>rest-assured</artifactId>
  <scope>test</scope>
</dependency>

<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-resteasy-reactive-jsonb</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-oidc</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-keycloak-authorization</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-hibernate-orm-panache</artifactId>
</dependency>
<dependency>
  <groupId>io.swagger.core.v3</groupId>
  <artifactId>swagger-core</artifactId>
  <version>2.2.8</version>
</dependency>
<dependency>
  <groupId>org.apache.poi</groupId>
  <artifactId>poi</artifactId>
  <version>5.2.0</version>
</dependency>
<dependency>
  <groupId>org.apache.poi</groupId>
  <artifactId>poi-ooxml</artifactId>
  <version>5.2.0</version>
</dependency>
<dependency>
  <groupId>io.quarkiverse.googlecloudservices</groupId>
  <artifactId>quarkus-google-cloud-storage</artifactId>
  <version>1.3.0</version>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
<dependency>
  <groupId>org.keycloak</groupId>
  <artifactId>keycloak-admin-client</artifactId>
  <version>21.0.1</version>
</dependency>
</dependencies> <build> <plugins> <plugin> <groupId>${quarkus.platform.group-id}</groupId> <artifactId>quarkus-maven-plugin</artifactId> <version>${quarkus.platform.version}</version> <extensions>true</extensions> <executions> <execution> <goals> <goal>build</goal> <goal>generate-code</goal> <goal>generate-code-tests</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>${compiler-plugin.version}</version> <configuration> <compilerArgs> <arg>-parameters</arg> </compilerArgs> </configuration> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>${surefire-plugin.version}</version> <configuration> <systemPropertyVariables> <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> <maven.home>${maven.home}</maven.home> </systemPropertyVariables> </configuration> </plugin> <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>${surefire-plugin.version}</version> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> <configuration> <systemPropertyVariables> <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path> <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> <maven.home>${maven.home}</maven.home> </systemPropertyVariables> </configuration> </execution> </executions> </plugin> </plugins> </build> <profiles> <profile> <id>native</id> <activation> <property> <name>native</name> </property> </activation> <properties> <skipITs>false</skipITs> <quarkus.package.type>native</quarkus.package.type> </properties> </profile> </profiles> </project>

and this is the one that has the problem reproduced:

<?xml version="1.0"?>

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <parent> <groupId>org.leadsManagement</groupId> <artifactId>leads-management</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.leadsManagement</groupId> <artifactId>leads-service</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>jar</packaging>

<properties> <compiler-plugin.version>3.10.1</compiler-plugin.version> <maven.compiler.release>17</maven.compiler.release> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> <quarkus.platform.version>2.15.1.Final</quarkus.platform.version> <skipITs>true</skipITs> <surefire-plugin.version>3.0.0-M7</surefire-plugin.version> </properties> <dependencyManagement> <dependencies>
 <dependency>
   <groupId>${quarkus.platform.group-id}</groupId>
   <artifactId>${quarkus.platform.artifact-id}</artifactId>
   <version>${quarkus.platform.version}</version>
   <type>pom</type>
   <scope>import</scope>
 </dependency>
</dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy-jsonb</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy-jackson</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-smallrye-health</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-arc</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-rest-client-reactive</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-rest-client-reactive-jackson</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-oidc</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-keycloak-authorization</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-smallrye-openapi</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-jdbc-postgresql</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-hibernate-orm-panache</artifactId> </dependency> <dependency> <groupId>io.swagger.core.v3</groupId> <artifactId>swagger-core</artifactId> <version>2.2.8</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>5.2.0</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>5.2.0</version> </dependency> <dependency> <groupId>io.quarkiverse.googlecloudservices</groupId> <artifactId>quarkus-google-cloud-storage</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-hibernate-validator</artifactId> </dependency> <dependency> <groupId>org.keycloak</groupId> <artifactId>keycloak-admin-client</artifactId> <version>21.0.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>${quarkus.platform.group-id}</groupId> <artifactId>quarkus-maven-plugin</artifactId> <version>${quarkus.platform.version}</version> <extensions>true</extensions> <executions> <execution> <goals> <goal>build</goal> <goal>generate-code</goal> <goal>generate-code-tests</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>${compiler-plugin.version}</version> <configuration> <compilerArgs> <arg>-parameters</arg> </compilerArgs> </configuration> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>${surefire-plugin.version}</version> <configuration> <systemPropertyVariables> <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> <maven.home>${maven.home}</maven.home> </systemPropertyVariables> </configuration> </plugin> <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>${surefire-plugin.version}</version> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> <configuration> <systemPropertyVariables> <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path> <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> <maven.home>${maven.home}</maven.home> </systemPropertyVariables> </configuration> </execution> </executions> </plugin> </plugins> </build> <profiles> <profile> <id>native</id> <activation> <property> <name>native</name> </property> </activation> <properties> <skipITs>false</skipITs> <quarkus.package.type>native</quarkus.package.type> </properties> </profile> </profiles> </project>

— Reply to this email directly, view it on GitHubhttps://github.com/quarkusio/quarkus/issues/25236#issuecomment-1462352679, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA7T475YJPNAPSSMEY7URU3W3H7O3ANCNFSM5UTRZDKA. You are receiving this because you were mentioned.Message ID: @.***>

Stephan Rudolph Vorsitzender der Geschäftsleitung [Logo rudolph ag]https://www.rudolph-ag.ch [Badge AWS Select Consulting Partner] https://aws.amazon.com/partners/find/partnerdetails/?id=0010L00001v31gVQAQ [Badge Oracle Gold Partner Weblogic Specialized] https://partner-finder.oracle.com/catalog/scr/Partner/SCPP-RUDOLPH-AG.html rudolph ag https://www.rudolph-ag.chWaldeckstrasse 6 CH-4900 Langenthal https://www.google.com/maps/dir//Waldeckstrasse+6,+4900+Langenthal,+Switzerland +41 31 312 19 20 @.*** @.***>www.rudolph-ag.ch https://www.rudolph-ag.ch

Thanks for the information @gaetancollaud

Hello Michał Thank you for your reply. I don’t know what I could deliver to you as a “small reproducer”. It is an interface application, based on Quarkus and Camel, which connects an existing application to a new SAP system. There are hundreds of lines of code. The described error occurs when I replace the lines in the pom.xml: Old: <quarkus.platform.version>2.6.1.Final</quarkus.platform.version> New: <quarkus.platform.version>2.8.0.Final</quarkus.platform.version> Kind regards Stephan