将vaadin流启动器应用程序部署到WebSphere Liberty时出错



我正试图将Vaadin的启动项目部署到Liberty服务器上,但我遇到了一个错误。我没有更改项目或服务器设置,以便您可以复制我的问题
(您可以看到下面的详细信息(

Liberty服务器:WebSphere Liberty Web Profile 8 21.0.0.6

入门项目:https://start.vaadin.com/app?dl&预设=最新

当前版本:

<properties>
<java.version>8</java.version>
<vaadin.version>20.0.2</vaadin.version>
</properties>

错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'vaadinApplicationContextInitializer' defined in class path resource [com/vaadin/flow/spring/VaadinApplicationConfiguration.class]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:610) ~[spring-beans-5.3.6.jar:5.3.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.6.jar:5.3.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.6.jar:5.3.6]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.6.jar:5.3.6]
.
.
.
Unable to find a single class implementing `AppShellConfigurator` from the following candidates:
com.example.application.Application
com.vaadin.flow.component.page.AppShellConfigurator
at com.vaadin.flow.server.AppShellRegistry.setShell(AppShellRegistry.java:140) ~[flow-server-7.0.2.jar:7.0.2]
at com.vaadin.flow.server.startup.VaadinAppShellInitializer.lambda$init$1(VaadinAppShellInitializer.java:134) ~[flow-server-7.0.2.jar:7.0.2]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_211]
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) ~[na:1.8.0_211]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_211]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_211]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_211]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_211]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_211]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_211]
at com.vaadin.flow.server.startup.VaadinAppShellInitializer.init(VaadinAppShellInitializer.java:132) ~[flow-server-7.0.2.jar:7.0.2]
at com.vaadin.flow.server.startup.VaadinAppShellInitializer.initialize(VaadinAppShellInitializer.java:79) ~[flow-server-7.0.2.jar:7.0.2]
at com.vaadin.flow.server.startup.VaadinServletContextStartupInitializer.process(VaadinServletContextStartupInitializer.java:42) ~[flow-server-7.0.2.jar:7.0.2]
... 48 common frames omitted

当我尝试调试时,我注意到VaadinAppShellInitializer.init方法";类";参数包含以下内容:

  1. "interface com.vaadin.flow.component.page.AppShellConfigurator">
  2. "class com.example.application.views.helloworld.HelloWorldView">
  3. "interface com.vaadin.flow.server.PageConfigurator">
  4. "class com.example.application.views.about.AboutView">
  5. "class com.example.application.application">

正如我所看到的,两个接口条目导致了问题,但我找不到解决方案。

以下是帮助我的指南:使用开放自由部署Spring Boot应用程序

  1. 我不得不将springBoot-2.0功能安装到freedom
  2. 我必须配置我的server.xml
<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">
<featureManager>
<feature>servlet-4.0</feature>
<feature>springBoot-2.0</feature>
</featureManager>
<httpEndpoint id="defaultHttpEndpoint" httpPort="9080" httpsPort="9443"/>
<springBootApplication id="guide-spring-boot" location="myapp-1.0-SNAPSHOT.war" name="guide-spring-boot"/>
</server>

最新更新