quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.82k stars 2.69k forks source link

Upgrade from 2.6.1 to 2.8.0 results in "Failed to start quarkus" #25236

Closed raguser closed 1 year ago

raguser commented 2 years ago

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

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

punkratz312 commented 2 years ago

same thing over here:

    "message":"Synthetic bean instance for io.quarkus.scheduler.runtime.SchedulerContext not initialized yet: io_quarkus_scheduler_runtime_SchedulerContext_97d170e1550eee4afc0af065b78cda302a97674c\n\t- a synthetic bean initialized during RUNTIME_INIT must not be accessed during STATIC_INIT\n\t- RUNTIME_INIT build steps that require access to synthetic beans initialized during RUNTIME_INIT should consume the SyntheticBeansRuntimeInitBuildItem",
{
  "timestamp":"2022-04-30T08:07:28.384Z",
  "sequence":1747,
  "loggerClassName":"org.jboss.logging.Logger",
  "loggerName":"io.quarkus.arc.impl",
  "level":"WARN",
  "message":"An error occurred during delivery of the @BeforeDestroyed(ApplicationScoped.class) event",
  "threadName":"main",
  "threadId":1,
  "mdc":{

  },
  "ndc":"",
  "hostName":"macbook-pro-von-vincent.local",
  "processName":"quarkus-run.jar",
  "processId":2457,
  "exception":{
    "refId":1,
    "exceptionType":"javax.enterprise.inject.CreationException",
    "message":"Synthetic bean instance for io.quarkus.scheduler.runtime.SchedulerContext not initialized yet: io_quarkus_scheduler_runtime_SchedulerContext_97d170e1550eee4afc0af065b78cda302a97674c\n\t- a synthetic bean initialized during RUNTIME_INIT must not be accessed during STATIC_INIT\n\t- RUNTIME_INIT build steps that require access to synthetic beans initialized during RUNTIME_INIT should consume the SyntheticBeansRuntimeInitBuildItem",
    "frames":[
      {
        "class":"io.quarkus.scheduler.runtime.SchedulerContext_360eeb610ab48a90056348e82e2c6a816b44f3e1_Synthetic_Bean",
        "method":"create"
      },
      {
        "class":"io.quarkus.scheduler.runtime.SchedulerContext_360eeb610ab48a90056348e82e2c6a816b44f3e1_Synthetic_Bean",
        "method":"get"
      },
      {
        "class":"io.quarkus.scheduler.runtime.SchedulerContext_360eeb610ab48a90056348e82e2c6a816b44f3e1_Synthetic_Bean",
        "method":"get"
      },
      {
        "class":"io.quarkus.arc.impl.CurrentInjectionPointProvider",
        "method":"get",
        "line":52
      },
      {
        "class":"io.quarkus.quartz.runtime.QuartzScheduler_Bean",
        "method":"create"
      },
      {
        "class":"io.quarkus.quartz.runtime.QuartzScheduler_Bean",
        "method":"create"
      },
      {
        "class":"io.quarkus.arc.impl.AbstractSharedContext",
        "method":"createInstanceHandle",
        "line":111
      },
      {
        "class":"io.quarkus.arc.impl.AbstractSharedContext$1",
        "method":"get",
        "line":35
      },
      {
        "class":"io.quarkus.arc.impl.AbstractSharedContext$1",
        "method":"get",
        "line":32
      },
      {
        "class":"io.quarkus.arc.impl.LazyValue",
        "method":"get",
        "line":26
      },
      {
        "class":"io.quarkus.arc.impl.ComputingCache",
        "method":"computeIfAbsent",
        "line":69
      },
      {
        "class":"io.quarkus.arc.impl.AbstractSharedContext",
        "method":"get",
        "line":32
      },
      {
        "class":"io.quarkus.quartz.runtime.QuartzScheduler_Observer_destroy_fb1039b288e54ae74a9e1acfa476b03b6c5afceb",
        "method":"notify"
      },
      {
        "class":"io.quarkus.arc.impl.EventImpl$Notifier",
        "method":"notifyObservers",
        "line":323
      },
      {
        "class":"io.quarkus.arc.impl.EventImpl$Notifier",
        "method":"notify",
        "line":311
      },
      {
        "class":"io.quarkus.arc.impl.EventImpl$Notifier",
        "method":"notify",
        "line":241
      },
      {
        "class":"io.quarkus.arc.impl.ArcContainerImpl",
        "method":"shutdown",
        "line":360
      },
      {
        "class":"io.quarkus.arc.Arc",
        "method":"shutdown",
        "line":52
      },
      {
        "class":"io.quarkus.arc.runtime.ArcRecorder$1",
        "method":"run",
        "line":44
      },
      {
        "class":"io.quarkus.runtime.StartupContext",
        "method":"runAllInReverseOrder",
        "line":84
      },
      {
        "class":"io.quarkus.runtime.StartupContext",
        "method":"close",
        "line":73
      },
      {
        "class":"io.quarkus.runner.ApplicationImpl",
        "method":"doStart"
      },
      {
        "class":"io.quarkus.runtime.Application",
        "method":"start",
        "line":101
      },
      {
        "class":"io.quarkus.runtime.ApplicationLifecycleManager",
        "method":"run",
        "line":103
      },
      {
        "class":"io.quarkus.runtime.Quarkus",
        "method":"run",
        "line":67
      },
      {
        "class":"io.quarkus.runtime.Quarkus",
        "method":"run",
        "line":41
      },
      {
        "class":"io.quarkus.runtime.Quarkus",
        "method":"run",
        "line":120
      },
      {
        "class":"io.quarkus.runner.GeneratedMain",
        "method":"main"
      },
      {
        "class":"jdk.internal.reflect.NativeMethodAccessorImpl",
        "method":"invoke0"
      },
      {
        "class":"jdk.internal.reflect.NativeMethodAccessorImpl",
        "method":"invoke",
        "line":62
      },
      {
        "class":"jdk.internal.reflect.DelegatingMethodAccessorImpl",
        "method":"invoke",
        "line":43
      },
      {
        "class":"java.lang.reflect.Method",
        "method":"invoke",
        "line":567
      },
      {
        "class":"io.quarkus.bootstrap.runner.QuarkusEntryPoint",
        "method":"doRun",
        "line":60
      },
      {
        "class":"io.quarkus.bootstrap.runner.QuarkusEntryPoint",
        "method":"main",
        "line":31
      }
    ]
  }
}

image

quarkus dev works fine


> Task :serverless:quarkusDev
Listening for transport dt_socket at address: 5005
Press [h] for more options>
Tests paused
Press [r] to resume testing, [h] for more options>
Press [r] to resume testing, [o] Toggle test output, [h] for more options>
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2022-04-30 10:46:26,151 WARN  [org.hib.map.RootClass] (Quarkus Main Thread) HHH000038: Composite-id class does not override equals(): com.movisens.therapydesigner.executor.serverless.web.infrastructure.persistence.model.TherapyVariableValue
2022-04-30 10:46:26,151 WARN  [org.hib.map.RootClass] (Quarkus Main Thread) HHH000039: Composite-id class does not override hashCode(): com.movisens.therapydesigner.executor.serverless.web.infrastructure.persistence.model.TherapyVariableValue
2022-04-30 10:46:26,159 WARN  [org.hib.map.RootClass] (Quarkus Main Thread) HHH000038: Composite-id class does not override equals(): com.movisens.therapydesigner.executor.serverless.web.infrastructure.persistence.model.ParticipantXConsent
2022-04-30 10:46:26,159 WARN  [org.hib.map.RootClass] (Quarkus Main Thread) HHH000039: Composite-id class does not override hashCode(): com.movisens.therapydesigner.executor.serverless.web.infrastructure.persistence.model.ParticipantXConsent
2022-04-30 10:46:26,527 INFO  [org.fly.cor.int.lic.VersionPrinter] (Quarkus Main Thread) Flyway Community Edition 8.5.8 by Redgate
2022-04-30 10:46:26,527 INFO  [org.fly.cor.int.lic.VersionPrinter] (Quarkus Main Thread) See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#8.5.8
2022-04-30 10:46:26,528 INFO  [org.fly.cor.int.lic.VersionPrinter] (Quarkus Main Thread) 
2022-04-30 10:46:26,664 INFO  [org.fly.cor.int.dat.bas.BaseDatabaseType] (Quarkus Main Thread) Database: jdbc:postgresql://localhost:5432/executor (PostgreSQL 13.2)
2022-04-30 10:46:26,742 INFO  [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Current version of schema "public": 1.0.7
2022-04-30 10:46:26,745 INFO  [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Schema "public" is up to date. No migration necessary.
2022-04-30 10:46:27,417 ERROR [io.qua.hib.orm.run.sch.SchemaManagementIntegrator] (Hibernate post-boot validation thread for <default>) Failed to validate Schema: Schema-validation: wrong column type encountered in column [id] in table [configuration_level]; found [serial (Types#INTEGER)], but expecting [int2 (Types#SMALLINT)]
2022-04-30 10:46:27,531 ERROR [io.qua.hib.orm.run.sch.SchemaManagementIntegrator] (Hibernate post-boot validation thread for <default>) The following SQL may resolve the database issues, as generated by the Hibernate schema migration tool. WARNING: You must manually verify this SQL is correct, this is a best effort guess, do not copy/paste it without verifying that it does what you expect.

2022-04-30 10:46:27,562 INFO  [io.quarkus] (Quarkus Main Thread) serverless 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.8.1.Final) started in 9.335s. Listening on: http://localhost:8080
2022-04-30 10:46:27,563 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2022-04-30 10:46:27,563 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [agroal, cdi, flyway, hibernate-orm, hibernate-orm-panache, hibernate-orm-panache-kotlin, hibernate-orm-rest-data-panache, jdbc-postgresql, kotlin, narayana-jta, quartz, reactive-pg-client, resteasy, resteasy-jackson, scheduler, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx]
machi1990 commented 2 years ago

@mkouba would you have some ideas on this?

quarkus-bot[bot] commented 2 years ago

/cc @manovotn, @mkouba

manovotn commented 2 years ago

Is there a reproducer for this?

The error suggests that the synth bean is being used too early during STATIC_INIT instead of RUNTIME_INIT but at the same time it mentions delivery of before destroyed for app scope which shouldn't really happen until very late at app lifecycle...

mkouba commented 2 years ago

I think that the An error occurred during delivery of the @BeforeDestroyed(ApplicationScoped.class) event warning is not the cause of the issue. In the provided log file I can see the following cause:

Caused by: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: io.quarkus.rest.client.reactive.runtime.RestClientReactiveCDIWrapperBase
mkouba commented 2 years ago

@michalszynkiewicz CC because of RestClientReactiveCDIWrapperBase ;-)

michalszynkiewicz commented 2 years ago

Can you create a small reproducer?

raguser commented 2 years ago

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

punkratz312 commented 2 years ago

I cloud solve my issue by removing environment specific config:

the jar which used the other env than quarkusDev which always workes fine, so the db configuration was not propper set therefore quarkus could not start.

image

still its strange why the jar does not print the quakurs header like the demo does in .jar file as well

image

image

mkouba commented 2 years ago

@raguser is it still a problem with the latest version of quarkus?

yadaom commented 2 years ago

I just upgraded to latest version of Quarkus from 2.7. I am getting the same error.

javax.enterprise.inject.CreationException: Synthetic bean instance for io.quarkus.scheduler.common.runtime.SchedulerContext not initialized yet: io_quarkus_scheduler_common_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
    at io.quarkus.scheduler.common.runtime.SchedulerContext_2480566c4c93757dc0e739a48013b17f9a0be445_Synthetic_Bean.create(Unknown Source)
    at io.quarkus.scheduler.common.runtime.SchedulerContext_2480566c4c93757dc0e739a48013b17f9a0be445_Synthetic_Bean.get(Unknown Source)

Old version, it was working fine. Does anyone has a solution?

mkouba commented 2 years ago

I just upgraded to latest version of Quarkus from 2.7. I am getting the same error.

javax.enterprise.inject.CreationException: Synthetic bean instance for io.quarkus.scheduler.common.runtime.SchedulerContext not initialized yet: io_quarkus_scheduler_common_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
  at io.quarkus.scheduler.common.runtime.SchedulerContext_2480566c4c93757dc0e739a48013b17f9a0be445_Synthetic_Bean.create(Unknown Source)
  at io.quarkus.scheduler.common.runtime.SchedulerContext_2480566c4c93757dc0e739a48013b17f9a0be445_Synthetic_Bean.get(Unknown Source)

Old version, it was working fine. Does anyone has a solution?

Could you share a full stack/log file?

gaetancollaud commented 2 years ago

Quarkus 2.12.0.Final: I got the same issue, but the root cause was completely unrelated...

it was because my application didn't had all the required entries:

@ConfigMapping(prefix = "backend")
public interface ApplicationConfig {
  boolean writeValues();
  boolean checkAlarms();

in the config, check-alarms was missing.

backend:
  write-values: false
#   check-alarms: false

After removing the comment, everything worked again.

@mkouba My full stacktrace was:

2022-09-02 09:19:00,754 WARN  [io.qua.arc.impl] (main) 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:60)
    at io.quarkus.hibernate.orm.runtime.JPAConfig_Bean.create(Unknown Source)
    at io.quarkus.hibernate.orm.runtime.JPAConfig_Bean.create(Unknown Source)
    at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:111)
    at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:35)
    at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:32)
    at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
    at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
    at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:32)
    at io.quarkus.hibernate.orm.runtime.JPAConfig_Observer_destroy_b8200764d6ca5f0908a962ee9c3337f12042c096.notify(Unknown Source)
    at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:323)
    at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:311)
    at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:241)
    at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:394)
    at io.quarkus.arc.Arc.shutdown(Arc.java:57)
    at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:47)
    at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84)
    at io.quarkus.runtime.StartupContext.close(StartupContext.java:73)
    at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
    at io.quarkus.runtime.Application.start(Application.java:101)
    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.run(StartupActionImpl.java:237)
    at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:259)
    at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:675)
    at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:713)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:395)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:211)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
    at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
    at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
geoand commented 2 years ago

@gaetancollaud any chance you could add a sample application we can use to debug?

gaetancollaud commented 2 years ago

@gaetancollaud any chance you could add a sample application we can use to debug?

The app is not open source and I anyway updated it to the latest quarkus version by know.

IMO it sounds like an config error that is intercepted wrongly (apparently by hibernate extension ?)

I can try to take a bit of time to reproduce it this week-end but I'm not sure I will succeed.

gaetancollaud commented 2 years ago

I wasn't able to create a small reproducer sorry.

geoand commented 2 years ago

Thanks for trying and letting us know

geoand commented 2 years ago

Can anyone confirm whether this is still an issue with the latest versions of Quarkus?

gaetancollaud commented 2 years ago

@geoand Still reproducing on 2.13.3, but the error message is way more clear now. Hibernate error is still there but just after we can clearly see the root issue (missing config in my case). Before (I don't remember which version), I just had the hibernate error and nothing else.

So for me this is solved. I don't know for @raguser

2022-10-21 08:43:19,348 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)
    at io.quarkus.hibernate.orm.runtime.JPAConfig_Bean.create(Unknown Source)
    at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:113)
    at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:37)
    at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:34)
    at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
    at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
    at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:34)
    at io.quarkus.hibernate.orm.runtime.JPAConfig_Observer_destroy_b8200764d6ca5f0908a962ee9c3337f12042c096.notify(Unknown Source)
    at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:326)
    at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:314)
    at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:244)
    at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:397)
    at io.quarkus.arc.Arc.shutdown(Arc.java:58)
    at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:47)
    at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84)
    at io.quarkus.runtime.StartupContext.close(StartupContext.java:73)
    at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
    at io.quarkus.runtime.Application.start(Application.java:101)
    at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:110)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:69)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:122)
    at io.quarkus.runner.GeneratedMain.main(Unknown Source)
    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:103)
    at java.base/java.lang.Thread.run(Thread.java:833)

2022-10-21 08:43:19,348 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)
    at io.quarkus.hibernate.orm.runtime.JPAConfig_Bean.create(Unknown Source)
    at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:113)
    at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:37)
    at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:34)
    at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
    at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
    at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:34)
    at io.quarkus.hibernate.orm.runtime.JPAConfig_Observer_destroy_b8200764d6ca5f0908a962ee9c3337f12042c096.notify(Unknown Source)
    at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:326)
    at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:314)
    at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:244)
    at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:397)
    at io.quarkus.arc.Arc.shutdown(Arc.java:58)
    at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:47)
    at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84)
    at io.quarkus.runtime.StartupContext.close(StartupContext.java:73)
    at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
    at io.quarkus.runtime.Application.start(Application.java:101)
    at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:110)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:69)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:122)
    at io.quarkus.runner.GeneratedMain.main(Unknown Source)
    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:103)
    at java.base/java.lang.Thread.run(Thread.java:833)

2022-10-21 08:43:19,349 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): io.smallrye.config.ConfigValidationException: Configuration validation failed:
    java.util.NoSuchElementException: SRCFG00014: The config property backend.check-alarms is required but it could not be found in any config source
    at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:967)
    at io.smallrye.config.ConfigMappingProvider.lambda$mapConfiguration$3(ConfigMappingProvider.java:923)
    at io.smallrye.config.SecretKeys.lambda$doUnlocked$0(SecretKeys.java:20)
    at io.smallrye.config.SecretKeys.doUnlocked(SecretKeys.java:29)
    at io.smallrye.config.SecretKeys.doUnlocked(SecretKeys.java:19)
    at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:923)
    at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:450)
    at io.quarkus.runtime.generated.Config.readConfig(Unknown Source)
    at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(Unknown Source)
    at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
    at io.quarkus.runtime.Application.start(Application.java:101)
    at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:110)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:69)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:122)
    at io.quarkus.runner.GeneratedMain.main(Unknown Source)
    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:103)
    at java.base/java.lang.Thread.run(Thread.java:833)

2022-10-21 08:43:19,349 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): io.smallrye.config.ConfigValidationException: Configuration validation failed:
    java.util.NoSuchElementException: SRCFG00014: The config property backend.check-alarms is required but it could not be found in any config source
    at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:967)
    at io.smallrye.config.ConfigMappingProvider.lambda$mapConfiguration$3(ConfigMappingProvider.java:923)
    at io.smallrye.config.SecretKeys.lambda$doUnlocked$0(SecretKeys.java:20)
    at io.smallrye.config.SecretKeys.doUnlocked(SecretKeys.java:29)
    at io.smallrye.config.SecretKeys.doUnlocked(SecretKeys.java:19)
    at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:923)
    at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:450)
    at io.quarkus.runtime.generated.Config.readConfig(Unknown Source)
    at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(Unknown Source)
    at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
    at io.quarkus.runtime.Application.start(Application.java:101)
    at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:110)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:69)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:122)
    at io.quarkus.runner.GeneratedMain.main(Unknown Source)
    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:103)
    at java.base/java.lang.Thread.run(Thread.java:833)
geoand commented 2 years ago

Thanks for the information @gaetancollaud

mkouba commented 1 year ago

I have to admit that I'm a bit confused. In any case, the WARN messages in the original Issue_upgrading_from_261_to_280_results_in_Failed_to_star_quarkus.txt and https://github.com/quarkusio/quarkus/issues/25236#issuecomment-1286530885 are not the cause - there's always a follow-up ERROR that explains the reason why the startup failed.

I'm going to close this issue - we can reopen it if we get a small reproducer app or more details. I removed the label area/scheduler too because it does not seem to be related.

raguser commented 1 year ago

Today I tried to upgrade to Quarkus 2.15.2.Final, unfortunately with same result.

Mansouri147 commented 1 year ago

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 here

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>

Note: my project has a lot of deps not related to this issue I just added on top of them the deps from the official github example to make it work.

As a CONCLUSION I've got the problem because at first I followed the official docs exactly so I think the problem is that some deps are missing in the official docs page but they do exist in the official github quickstart example it helped me a lot before to configure anything in quarkus and till now still quite useful.

raguser commented 1 year ago

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">

4.0.0 org.parentProject parent-project 1.0.0-SNAPSHOT org.myProject my-project 1.0.0-SNAPSHOT 3.10.1 17 UTF-8 UTF-8 quarkus-bom io.quarkus.platform 2.15.1.Final true 3.0.0-M7 ${quarkus.platform.group-id} ${quarkus.platform.artifact-id} ${quarkus.platform.version} pom import io.quarkus quarkus-rest-client-reactive-jackson io.quarkus quarkus-resteasy-reactive io.quarkus quarkus-resteasy-reactive-jackson io.quarkus quarkus-rest-client-reactive io.quarkus quarkus-arc io.quarkus quarkus-junit5 test io.rest-assured rest-assured test io.quarkus quarkus-resteasy-reactive-jsonb io.quarkus quarkus-smallrye-health io.quarkus quarkus-oidc io.quarkus quarkus-keycloak-authorization io.quarkus quarkus-smallrye-openapi io.quarkus quarkus-jdbc-postgresql io.quarkus quarkus-hibernate-orm-panache io.swagger.core.v3 swagger-core 2.2.8 org.apache.poi poi 5.2.0 org.apache.poi poi-ooxml 5.2.0 io.quarkiverse.googlecloudservices quarkus-google-cloud-storage 1.3.0 io.quarkus quarkus-hibernate-validator org.keycloak keycloak-admin-client 21.0.1 ${quarkus.platform.group-id} quarkus-maven-plugin ${quarkus.platform.version} true build generate-code generate-code-tests maven-compiler-plugin ${compiler-plugin.version} -parameters maven-surefire-plugin ${surefire-plugin.version} org.jboss.logmanager.LogManager ${maven.home} maven-failsafe-plugin ${surefire-plugin.version} integration-test verify ${project.build.directory}/${project.build.finalName}-runner org.jboss.logmanager.LogManager ${maven.home} native native false native

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">

org.leadsManagement leads-management 1.0.0-SNAPSHOT 4.0.0 org.leadsManagement leads-service 1.0.0-SNAPSHOT jar 3.10.1 17 UTF-8 UTF-8 quarkus-bom io.quarkus.platform 2.15.1.Final true 3.0.0-M7 ${quarkus.platform.group-id} ${quarkus.platform.artifact-id} ${quarkus.platform.version} pom import io.quarkus quarkus-resteasy-jsonb io.quarkus quarkus-resteasy-jackson io.quarkus quarkus-smallrye-health io.quarkus quarkus-arc io.quarkus quarkus-resteasy io.quarkus quarkus-rest-client-reactive io.quarkus quarkus-rest-client-reactive-jackson io.quarkus quarkus-junit5 test io.rest-assured rest-assured test io.quarkus quarkus-oidc io.quarkus quarkus-keycloak-authorization io.quarkus quarkus-smallrye-openapi io.quarkus quarkus-jdbc-postgresql io.quarkus quarkus-hibernate-orm-panache io.swagger.core.v3 swagger-core 2.2.8 org.apache.poi poi 5.2.0 org.apache.poi poi-ooxml 5.2.0 io.quarkiverse.googlecloudservices quarkus-google-cloud-storage 1.3.0 io.quarkus quarkus-hibernate-validator org.keycloak keycloak-admin-client 21.0.1 ${quarkus.platform.group-id} quarkus-maven-plugin ${quarkus.platform.version} true build generate-code generate-code-tests maven-compiler-plugin ${compiler-plugin.version} -parameters maven-surefire-plugin ${surefire-plugin.version} org.jboss.logmanager.LogManager ${maven.home} maven-failsafe-plugin ${surefire-plugin.version} integration-test verify ${project.build.directory}/${project.build.finalName}-runner org.jboss.logmanager.LogManager ${maven.home} native native false native

— 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