Spring Boot应用程序启动时出错(Vaadin)

huangapple go评论84阅读模式
英文:

Error on start of Spring Boot Application (Vaadin)

问题

我尝试更改了 Spring Boot 应用程序的端口,激活了 Vaadin PRO,在 Eclipse/PowerShell 中运行,有和没有调试模式运行... 我也安装了 Node.js 12.16.1(包括 npm 6.13.4)。我始终会遇到以下错误:

java.lang.RuntimeException: 无法初始化 Vaadin DevModeHandler

:: Spring Boot ::        (v2.2.4.RELEASE)

2020-03-16 07:34:43.681  INFO 12284 --- [           main] s.q.myapp.ui.MyAppWebApplication   : 在 luigi10 上以 PID 12284 启动 MyAppWebApplication(C:\Workspaces\myapp\myapp\myapp-web\target\classes,在 C:\Workspaces\myapp\myapp\myapp-web 中的 luigi.k 开始)
...
2020-03-16 07:34:47.156  INFO 12284 --- [           main] dev-updater                              : 跳过 `npm install`。
...
2020-03-16 07:34:50.444 ERROR 12284 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : 初始化上下文初始化事件到类 [com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener] 的监听器实例时出现异常
...
2020-03-16 07:34:50.675  WARN 12284 --- [           main] o.a.c.loader.WebappClassLoaderBase       : Web 应用程序 [ROOT] 似乎已启动了名为 [Thread-1] 的线程,但未能停止它。这很可能会导致内存泄漏。线程的堆栈跟踪:
...
2020-03-16 07:34:50.669  INFO 12284 --- [           main] o.apache.catalina.core.StandardService   : 停止服务 [Tomcat]
...
2020-03-16 07:34:50.684  INFO 12284 --- [           main] ConditionEvaluationReportLoggingListener :

ApplicationContextException。要显示条件报告,请使用启用了“debug”的应用程序重新运行。
2020-03-16 07:34:50.693 ERROR 12284 --- [           main] o.s.boot.SpringApplication               : 应用程序运行失败

ApplicationContextException:无法启动 Web 服务器;嵌入式 Tomcat 启动失败
...
Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] 启动失败
...

pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.4.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.corp</groupId>
    <artifactId>myapp-web</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>myapp-web</name>
    <description>WEB for MyApp</description>

    <properties>
        <java.version>11</java.version>
        <vaadin.version>14.1.17</vaadin.version>
    </properties>
    <!-- ... -->
</project>

解决方案,适用于我的情况:我从 Git 检出了 node_modules 文件夹。我删除了文件夹 node_modules 中的所有模块以及文件 package-lock.json。然后我运行了 Spring Boot 应用程序,自动启动了 'npm install' 并生成了新的模块。应用程序成功启动。

英文:

I tried to change port of Spring Boot application, activated Vaadin PRO, run in Eclipse/PowerShell, run in debug and without debug... I have node.js 12.16.1 (includes npm 6.13.4) installed too. I always get an error:
java.lang.RuntimeException: Unable to initialize Vaadin DevModeHandler

:: Spring Boot ::        (v2.2.4.RELEASE)
2020-03-16 07:34:43.681  INFO 12284 --- [           main] s.q.myapp.ui.MyAppWebApplication   : Starting MyAppWebApplication on luigi10 with PID 12284 (C:\Workspaces\myapp\myapp\myapp-web\target\classes started by luigi.k in C:\Workspaces\myapp\myapp\myapp-web)
2020-03-16 07:34:43.684  INFO 12284 --- [           main] s.q.myapp.ui.MyAppWebApplication   : No active profile set, falling back to default profiles: default
2020-03-16 07:34:44.734  INFO 12284 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8082 (http)
2020-03-16 07:34:44.744  INFO 12284 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-03-16 07:34:44.745  INFO 12284 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.30]
2020-03-16 07:34:44.936  INFO 12284 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-03-16 07:34:44.936  INFO 12284 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1210 ms
2020-03-16 07:34:47.109  INFO 12284 --- [           main] c.v.f.s.VaadinServletContextInitializer  : Search for subclasses and classes with annotations took 1 seconds
2020-03-16 07:34:47.112  INFO 12284 --- [           main] c.v.f.server.startup.DevModeInitializer  : Starting dev-mode updaters in C:\Workspaces\myapp\myapp\myapp-web folder.
2020-03-16 07:34:47.141  INFO 12284 --- [           main] dev-updater                              : Visited 122 classes. Took 19 ms.
2020-03-16 07:34:47.156  INFO 12284 --- [           main] dev-updater                              : Skipping `npm install`.
2020-03-16 07:34:47.156  INFO 12284 --- [           main] dev-updater                              : Copying frontend resources from jar files ...
2020-03-16 07:34:47.219  INFO 12284 --- [           main] dev-updater                              : Visited 12 resources. Took 63 ms.
2020-03-16 07:34:47.286  INFO 12284 --- [           main] dev-updater                              : Updated C:\Workspaces\myapp\myapp\myapp-web\target\frontend\generated-flow-imports.js
2020-03-16 07:34:49.562  INFO 12284 --- [           main] dev-webpack                              : Starting webpack-dev-server, port: 57479 dir: C:\Workspaces\myapp\myapp\myapp-web
2020-03-16 07:34:49.577  INFO 12284 --- [           main] dev-webpack                              : Running webpack to compile frontend resources. This may take a moment, please stand by...
2020-03-16 07:34:50.406 ERROR 12284 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Exception sending context initialized event to listener instance of class [com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener]
java.lang.RuntimeException: Unable to initialize Vaadin DevModeHandler
at com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener.contextInitialized(VaadinServletContextInitializer.java:347) ~[vaadin-spring-12.1.2.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4683) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[na:na]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:459) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.&lt;init&gt;(TomcatWebServer.java:88) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at com.comp.myapp.ui.MyAppWebApplication.main(MyAppWebApplication.java:10) ~[classes/:na]
Caused by: javax.servlet.ServletException: java.lang.IllegalStateException: Webpack exited prematurely
at com.vaadin.flow.server.startup.DevModeInitializer.initDevModeHandler(DevModeInitializer.java:301) ~[flow-server-2.1.5.jar:2.1.5]
at com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener.contextInitialized(VaadinServletContextInitializer.java:344) ~[vaadin-spring-12.1.2.jar:na]
... 38 common frames omitted
Caused by: java.lang.IllegalStateException: Webpack exited prematurely
at com.vaadin.flow.server.DevModeHandler.&lt;init&gt;(DevModeHandler.java:202) ~[flow-server-2.1.5.jar:2.1.5]
at com.vaadin.flow.server.DevModeHandler.createInstance(DevModeHandler.java:299) ~[flow-server-2.1.5.jar:2.1.5]
at com.vaadin.flow.server.DevModeHandler.start(DevModeHandler.java:249) ~[flow-server-2.1.5.jar:2.1.5]
at com.vaadin.flow.server.DevModeHandler.start(DevModeHandler.java:226) ~[flow-server-2.1.5.jar:2.1.5]
at com.vaadin.flow.server.startup.DevModeInitializer.initDevModeHandler(DevModeInitializer.java:297) ~[flow-server-2.1.5.jar:2.1.5]
... 39 common frames omitted
2020-03-16 07:34:50.444 ERROR 12284 --- [           main] o.apache.catalina.core.StandardContext   : One or more listeners failed to start. Full details will be found in the appropriate container log file
2020-03-16 07:34:50.445 ERROR 12284 --- [           main] o.apache.catalina.core.StandardContext   : Context [] startup failed due to previous errors
2020-03-16 07:34:50.453  WARN 12284 --- [           main] o.a.c.loader.WebappClassLoaderBase       : The web application [ROOT] appears to have started a thread named [Thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.2/java.net.PlainSocketImpl.accept0(Native Method)
java.base@11.0.2/java.net.PlainSocketImpl.socketAccept(PlainSocketImpl.java:159)
java.base@11.0.2/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:458)
java.base@11.0.2/java.net.ServerSocket.implAccept(ServerSocket.java:551)
java.base@11.0.2/java.net.ServerSocket.accept(ServerSocket.java:519)
app//com.vaadin.flow.server.DevServerWatchDog$WatchDogServer.run(DevServerWatchDog.java:58)
java.base@11.0.2/java.lang.Thread.run(Thread.java:834)
2020-03-16 07:34:50.669  INFO 12284 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2020-03-16 07:34:50.675  WARN 12284 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2020-03-16 07:34:50.684  INFO 12284 --- [           main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with &#39;debug&#39; enabled.
2020-03-16 07:34:50.693 ERROR 12284 --- [           main] o.s.boot.SpringApplication               : Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at com.comp.myapp.ui.MyAppWebApplication.main(MyAppWebApplication.java:10) ~[classes/:na]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.&lt;init&gt;(TomcatWebServer.java:88) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
... 8 common frames omitted
Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:171) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:110) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
... 13 common frames omitted

pom.xml

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
&lt;parent&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
&lt;version&gt;2.2.4.RELEASE&lt;/version&gt;
&lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
&lt;/parent&gt;
&lt;groupId&gt;com.corp&lt;/groupId&gt;
&lt;artifactId&gt;myapp-web&lt;/artifactId&gt;
&lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
&lt;name&gt;myapp-web&lt;/name&gt;
&lt;description&gt;WEB for MyApp&lt;/description&gt;
&lt;properties&gt;
&lt;java.version&gt;11&lt;/java.version&gt;
&lt;vaadin.version&gt;14.1.17&lt;/vaadin.version&gt;
&lt;/properties&gt;
&lt;repositories&gt;
&lt;repository&gt;
&lt;id&gt;central&lt;/id&gt;
&lt;url&gt;https://repo.maven.apache.org/maven2&lt;/url&gt;
&lt;snapshots&gt;
&lt;enabled&gt;false&lt;/enabled&gt;
&lt;/snapshots&gt;
&lt;/repository&gt;
&lt;repository&gt;
&lt;id&gt;vaadin-addons&lt;/id&gt;
&lt;url&gt;https://maven.vaadin.com/vaadin-addons&lt;/url&gt;
&lt;snapshots&gt;
&lt;enabled&gt;false&lt;/enabled&gt;
&lt;/snapshots&gt;
&lt;/repository&gt;
&lt;/repositories&gt;
&lt;dependencies&gt;
&lt;dependency&gt;
&lt;groupId&gt;com.vaadin&lt;/groupId&gt;
&lt;artifactId&gt;vaadin-crud-flow&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;com.vaadin&lt;/groupId&gt;
&lt;artifactId&gt;vaadin-spring-boot-starter&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;exclusions&gt;
&lt;exclusion&gt;
&lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
&lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
&lt;/exclusion&gt;
&lt;/exclusions&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;com.vaadin&lt;/groupId&gt;
&lt;artifactId&gt;vaadin&lt;/artifactId&gt;
&lt;exclusions&gt;
&lt;exclusion&gt;
&lt;groupId&gt;com.vaadin.webjar&lt;/groupId&gt;
&lt;artifactId&gt;*&lt;/artifactId&gt;
&lt;/exclusion&gt;
&lt;exclusion&gt;
&lt;groupId&gt;org.webjars.bowergithub.insites&lt;/groupId&gt;
&lt;artifactId&gt;*&lt;/artifactId&gt;
&lt;/exclusion&gt;
&lt;exclusion&gt;
&lt;groupId&gt;org.webjars.bowergithub.polymer&lt;/groupId&gt;
&lt;artifactId&gt;*&lt;/artifactId&gt;
&lt;/exclusion&gt;
&lt;exclusion&gt;
&lt;groupId&gt;org.webjars.bowergithub.polymerelements&lt;/groupId&gt;
&lt;artifactId&gt;*&lt;/artifactId&gt;
&lt;/exclusion&gt;
&lt;exclusion&gt;
&lt;groupId&gt;org.webjars.bowergithub.vaadin&lt;/groupId&gt;
&lt;artifactId&gt;*&lt;/artifactId&gt;
&lt;/exclusion&gt;
&lt;exclusion&gt;
&lt;groupId&gt;org.webjars.bowergithub.webcomponents&lt;/groupId&gt;
&lt;artifactId&gt;*&lt;/artifactId&gt;
&lt;/exclusion&gt;
&lt;/exclusions&gt;
&lt;/dependency&gt;
&lt;/dependencies&gt;
&lt;dependencyManagement&gt;
&lt;dependencies&gt;
&lt;dependency&gt;
&lt;groupId&gt;com.vaadin&lt;/groupId&gt;
&lt;artifactId&gt;vaadin-bom&lt;/artifactId&gt;
&lt;version&gt;${vaadin.version}&lt;/version&gt;
&lt;type&gt;pom&lt;/type&gt;
&lt;scope&gt;import&lt;/scope&gt;
&lt;/dependency&gt;
&lt;/dependencies&gt;
&lt;/dependencyManagement&gt;
&lt;build&gt;
&lt;plugins&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
&lt;/build&gt;
&lt;/project&gt;

The solution, that worked for me:
I had node_modules folder checkout from GIT. I deleted all modules from folder node_modules and file package-lock.json too. Then I ran Spring Boot application and automatically started 'npm install' and generated new modules. Application was starting without error.

答案1

得分: 5

运行mvn clean package -Pproduction,按照 Vaadin 文档进行操作。对我有效。

英文:

Run mvn clean package -Pproduction following by Vaadin documentation. It works for me.

答案2

得分: 3

运行 mvn clean install。这是使用Vaadin的基础操作。
如果你在开始使用Vaadin时遇到任何问题,请先重新构建项目。

英文:

Run mvn clean install. This is a basic of work with Vaadin.
If you have any problem with Vaadin at first rebuild the project.

答案3

得分: 0

Piotr所述,mvn clean package -Pproduction是官方Vaadin文档中提到的命令,您可以在https://vaadin.com/docs/v14/flow/production/overview上找到有关如何构建用于生产的详细信息,包括使用Maven。

英文:

As Piotr said mvn clean package -Pproduction is cmd by official Vaadin docs and you can find details how to build for production including maven on https://vaadin.com/docs/v14/flow/production/overview

huangapple
  • 本文由 发表于 2020年3月16日 14:53:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/60701501.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定