question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vaadin 15 and openliberty 20.0.0.x throws javax.servlet.ServletException: java.lang.reflect.InvocationTargetException

See original GitHub issue

Starting the example project from https://vaadin.com/start/latest with openliberty ( https://openliberty.io/ ) results in an exception.

  • (Open Liberty 20.0.0.4/wlp-1.0.39.cl200420200401-1714) on OpenJDK 64-Bit Server VM, version 13.0.2+6-MTS (en_US)
  • Vaadin 15.0.6
  • Ubuntu 20.04

see attachted example project:

cdi-java-ee-vadin15.zip

run

npm install
mvn clean package liberty:run

results in:

[INFO] [WARNING ] CWWWC0001W: The [com.vaadin.flow.server.startup.DevModeInitializer@16332e8e] ServletContainerInitializer, located in the following application [dada Project], produced the following error while invoking the onStartup method: [javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
[INFO]  at com.vaadin.flow.server.startup.ClassLoaderAwareServletContainerInitializer.onStartup(ClassLoaderAwareServletContainerInitializer.java:99)
[INFO]  at com.ibm.ws.webcontainer.webapp.WebApp.initializeServletContainerInitializers(WebApp.java:2530)
[INFO]  at [internal classes]
[INFO] Caused by: java.lang.reflect.InvocationTargetException
[INFO]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO]  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO]  at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[INFO]  at com.vaadin.flow.server.startup.ClassLoaderAwareServletContainerInitializer.onStartup(ClassLoaderAwareServletContainerInitializer.java:94)
[INFO]  ... 2 more
[INFO] Caused by: java.lang.IllegalStateException: There are neither 'flow-build-info.json' nor 'webpack.config.js' file available in the project/working directory. Ensure 'webpack.config.js' is present or trigger creation of 'flow-build-info.json' via running 'prepare-frontend' Maven goal.
[INFO]  ... 14 more
[INFO] ]
[INFO] [err] [Default Executor-thread-6] INFO com.vaadin.cdi.CdiServletDeployer - Automatically deploying CDI Vaadin servlet to /*
[INFO] [ERROR   ] SRVE0283E: Exception caught while initializing context: java.lang.IllegalStateException: There are neither 'flow-build-info.json' nor 'webpack.config.js' file available in the project/working directory. Ensure 'webpack.config.js' is present or trigger creation of 'flow-build-info.json' via running 'prepare-frontend' Maven goal.
[INFO]  at com.vaadin.flow.server.DeploymentConfigurationFactory.verifyMode(DeploymentConfigurationFactory.java:436)
[INFO]  at com.vaadin.flow.server.DeploymentConfigurationFactory.readBuildInfo(DeploymentConfigurationFactory.java:186)
[INFO]  at com.vaadin.flow.server.DeploymentConfigurationFactory.createInitParameters(DeploymentConfigurationFactory.java:165)
[INFO]  at com.vaadin.flow.server.DeploymentConfigurationFactory.createPropertyDeploymentConfiguration(DeploymentConfigurationFactory.java:127)
[INFO]  at com.vaadin.flow.server.startup.ServletDeployer$StubServletConfig.createDeploymentConfiguration(ServletDeployer.java:184)
[INFO]  at com.vaadin.flow.server.startup.ServletDeployer.lambda$getServletConfigurations$0(ServletDeployer.java:242)
[INFO]  at java.base/java.util.Optional.ifPresent(Optional.java:176)
[INFO]  at com.vaadin.flow.server.startup.ServletDeployer.getServletConfigurations(ServletDeployer.java:241)
[INFO]  at com.vaadin.flow.server.startup.ServletDeployer.contextInitialized(ServletDeployer.java:219)
[INFO]  at com.vaadin.flow.server.startup.ServletContextListeners.contextInitialized(ServletContextListeners.java:42)
[INFO]  at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2417)
[INFO]  at [internal classes]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mehdi-vaadincommented, May 20, 2020

@ollin thanks for the update 😃

1reaction
ollincommented, May 20, 2020

@mehdi-vaadin live reload in openliberty works with this simple example. I didn’t test advanced features. But so far, so good… 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

[FIXED] getting build error after updating ads dependencies to ...
Issue I have a problem with Hibernate . I try to parse to List but It throws an exception:... [FIXED] Error creating bean...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found