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

PiT 24.5: any new quarkus vaadin generated application does not work in prod mode #19876

Closed
Tracked by #6634
manolo opened this issue Sep 3, 2024 · 3 comments
Closed
Tracked by #6634

Comments

@manolo
Copy link
Member

manolo commented Sep 3, 2024

Description of the bug

Compiling a new-created vaadin-quarkus application compiles but fails to run.
The error is:

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:51)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	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.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:76)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:54)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:503)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
	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)
	... 6 more
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.<clinit>(Unknown Source)
	... 15 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)
	... 16 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)
	... 18 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:1340)
	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)
	... 19 more

Expected behavior

it works

Minimal reproducible example

  1. Create a new vaadin-quarkus project and compile it by running:
mvn -ntp -q -B io.quarkus.platform:quarkus-maven-plugin:3.1.1.Final:create \
  -Dextensions=vaadin -DwithCodestart -DprojectGroupId=com.vaadin.starter \
  -DprojectArtifactId=vaadin-quarkus
cd vaadin-quarkus
./mvnw -ntp -B -Pproduction package  
  1. Run the project and see the error in console
 java -jar target/quarkus-app/quarkus-run.jar

Versions

  • Vaadin version: 24.5.0.alpha13/alpha14 and 24.4.10/24.4.11
@mcollovati
Copy link
Collaborator

This should have been fixed by #19856

@mshabarov
Copy link
Contributor

mshabarov commented Sep 3, 2024

To be re-tested with 24.5.0.alpha14 the fix hasn't yet released. Will be released with Flow 24.5.0.alpha17 and Platform 24.5.0.alpha15

@mshabarov
Copy link
Contributor

Released in Flow 24.5.0.alpha17.

@github-project-automation github-project-automation bot moved this from 🔖 High Priority (P1) to ✅ Closed in Vaadin Flow bugs & maintenance (Vaadin 10+) Sep 4, 2024
@github-project-automation github-project-automation bot moved this from 🟢Ready to Go to Done in Vaadin Flow ongoing work (Vaadin 10+) Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants