Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application fails to start in production mode with Quarkus 3.14.x #19914

Closed
diversit opened this issue Sep 9, 2024 · 1 comment
Closed

Application fails to start in production mode with Quarkus 3.14.x #19914

diversit opened this issue Sep 9, 2024 · 1 comment

Comments

@diversit
Copy link

diversit commented Sep 9, 2024

Description of the bug

After upgrading Quarkus from 3.13.3 to 3.14.x, Quarkus fails to start when running Quarkus in production mode by using the quarkus-run-jar.
The logs also look different; lines are no longer colored and the 'Quarkus' ascii-art is not printed anymore.

Changing the version back to 3.13.3 the application works again.
Issue also only when running in production mode. quarkus dev works fine.

Error also reported with Quarkus as issue 43073 but might also be caused by Vaadin's DeploymentConfigurationFactory.createInitParameters L97.

Log output:

java -jar target/quarkus-app/quarkus-run.jar
The DelayedHandler was closed before any children handlers were configured. Messages will be written to stderr.
2024-09-09 16:38:01,171 DEBUG [org.jboss.logging] (main) Logging Provider: org.jboss.logging.JBossLogManagerProvider

2024-09-09 16:38:01,179 DEBUG [io.smallrye.config] (main) SRCFG01006: Loaded ConfigSource BuildTime RunTime Fixed with ordinal 2147483647

2024-09-09 16:38:01,179 DEBUG [io.smallrye.config] (main) SRCFG01006: Loaded ConfigSource SysPropConfigSource with ordinal 400

2024-09-09 16:38:01,179 DEBUG [io.smallrye.config] (main) SRCFG01006: Loaded ConfigSource EnvConfigSource with ordinal 300

2024-09-09 16:38:01,179 DEBUG [io.smallrye.config] (main) SRCFG01006: Loaded ConfigSource PropertiesConfigSource[source=jar:file:https:///Users/dhl/Project/tryout/base-starter-flow-quarkus/target/quarkus-app/app/base-starter-flow-quarkus-1.0-SNAPSHOT.jar!/application.properties] with ordinal 250

2024-09-09 16:38:01,179 DEBUG [io.smallrye.config] (main) SRCFG01006: Loaded ConfigSource DefaultValuesConfigSource with ordinal -2147483648

2024-09-09 16:38:01,280 DEBUG [io.netty.util.internal.logging.InternalLoggerFactory] (main) Using SLF4J as the default logging framework

2024-09-09 16:38:01,281 DEBUG [io.netty.util.internal.InternalThreadLocalMap] (main) -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024

2024-09-09 16:38:01,281 DEBUG [io.netty.util.internal.InternalThreadLocalMap] (main) -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096

2024-09-09 16:38:01,286 DEBUG [io.quarkus.arc.impl] (main) ArC DI container initialized [beans=50, observers=6]

2024-09-09 16:38:01,317 DEBUG [io.quarkus.arc.impl] (main) Loaded 52 removed beans lazily

2024-09-09 16:38:01,317 DEBUG [io.quarkus.arc.runtime.BeanContainerImpl] (main) No matching bean found for type class io.quarkus.undertow.runtime.HttpSessionContext and qualifiers []. The bean might have been marked as unused and removed during build.

2024-09-09 16:38:01,372 DEBUG [io.undertow.session] (main) Setting default session timeout to 1800

2024-09-09 16:38:01,379 DEBUG [io.vertx.core.logging.LoggerFactory] (main) Using io.vertx.core.logging.SLF4JLogDelegateFactory

2024-09-09 16:38:01,380 DEBUG [io.netty.util.ResourceLeakDetector] (main) -Dio.netty.leakDetection.level: simple

2024-09-09 16:38:01,380 DEBUG [io.netty.util.ResourceLeakDetector] (main) -Dio.netty.leakDetection.targetRecords: 4

2024-09-09 16:38:01,405 DEBUG [com.vaadin.flow.server.startup.DefaultApplicationConfigurationFactory] (main) Unable to fully determine correct flow-build-info.
Accepting file 'file:/Users/dhl/Project/tryout/base-starter-flow-quarkus/target/quarkus-app/app/base-starter-flow-quarkus-1.0-SNAPSHOT.jar!/META-INF/VAADIN/config/flow-build-info.json'

2024-09-09 16:38:01,418 DEBUG [com.vaadin.flow.server.startup.VaadinAppShellInitializer] (main) Using com.example.starter.base.AppConfig class for configuring `index.html` response

2024-09-09 16:38:01,418 INFO  [io.undertow.servlet] (main) Initializing AtmosphereFramework

2024-09-09 16:38:01,420 DEBUG [com.vaadin.base.devserver.startup.DevModeStartupListener] (main) Skipping DEV MODE because PRODUCTION MODE is set.

2024-09-09 16:38:01,421 DEBUG [io.undertow.session] (main) Registered session listener io.undertow.servlet.core.SessionListenerBridge@c1fca1e

2024-09-09 16:38:01,427 DEBUG [io.quarkus.arc.impl] (main) ArC DI container shut down

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
Caused by: java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
	at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:340)
	at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newConstructorAccessor(MethodHandleAccessorFactory.java:103)
	at java.base/jdk.internal.reflect.ReflectionFactory.newConstructorAccessor(ReflectionFactory.java:173)
	at java.base/java.lang.reflect.Constructor.acquireConstructorAccessor(Constructor.java:549)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:70)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
	at io.quarkus.runner.GeneratedMain.main(Unknown Source)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	... 3 more
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.<clinit>(Unknown Source)
	... 16 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
	at io.quarkus.undertow.runtime.UndertowDeploymentRecorder.bootServletContainer(UndertowDeploymentRecorder.java:575)
	at io.quarkus.deployment.steps.UndertowBuildStep$build1824075897.deploy_0(Unknown Source)
	at io.quarkus.deployment.steps.UndertowBuildStep$build1824075897.deploy(Unknown Source)
	... 17 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:253)
	at io.quarkus.undertow.runtime.UndertowDeploymentRecorder.bootServletContainer(UndertowDeploymentRecorder.java:564)
	... 19 more
Caused by: java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
	at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
	at java.base/java.util.Properties.put(Properties.java:1346)
	at java.base/java.util.Properties.setProperty(Properties.java:230)
	at com.vaadin.flow.server.DeploymentConfigurationFactory.createInitParameters(DeploymentConfigurationFactory.java:97)
	at com.vaadin.flow.server.DeploymentConfigurationFactory.createPropertyDeploymentConfiguration(DeploymentConfigurationFactory.java:75)
	at com.vaadin.flow.server.startup.ServletDeployer$StubServletConfig.createDeploymentConfiguration(ServletDeployer.java:139)
	at com.vaadin.flow.server.startup.ServletDeployer.lambda$getServletConfigurations$0(ServletDeployer.java:198)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at com.vaadin.flow.server.startup.ServletDeployer.getServletConfigurations(ServletDeployer.java:197)
	at com.vaadin.flow.server.startup.ServletDeployer.contextInitialized(ServletDeployer.java:148)
	at com.vaadin.flow.server.startup.ServletContextListeners.contextInitialized(ServletContextListeners.java:44)
	at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:184)
	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:217)
	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:186)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$9$1.call(UndertowDeploymentRecorder.java:623)
	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:251)
	... 20 more

Expected behavior

Application starts normally

Minimal reproducible example

I can replicate it with the base-starter-flow-quarkus application from Vaadin (branch v24).

Running

./mvnw -P production clean verify
java -jar target/quarkus-app/quarkus-run.jar

Runs the application normally.

Updating the pom.xml to use quarkus.platform.version 3.14.2 and running the same commands again gives an error and also does a very different log formatting.

When changing the quarkus.platform.version 3.13.2 the application works and logs are normal again.

Versions

  • Vaadin / Flow version: 24.4.10
  • Java version: 22.0.2
  • OS version: Darwin MacBook-Pro-8.local 22.6.0 Darwin Kernel Version 22.6.0: Mon Jun 24 01:21:41 PDT 2024; root:xnu-8796.141.3.706.2~1/RELEASE_ARM64_T6020 arm64
  • Browser version (if applicable): N/A
  • Application Server (if applicable): Quarkus 3.14.x
  • IDE (if applicable): N/A
@mcollovati
Copy link
Collaborator

mcollovati commented Sep 9, 2024

Duplicated of #19855.
The issue has been resolved by #19856 and released in Vaadin 24.4.11

@mcollovati mcollovati closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants