Upgrading from 14.0.3 to 14.0.7 breaks app
I just upgraded from Vaadin 14.0.3 to 14.07 the app will not start giving me an IllegalStateException. Please see the error below.
java.lang.IllegalStateException: Running project in development mode with no access to folder '/Users/alejandro/git/pdf-browser'.
Build project in production mode instead, see https://vaadin.com/docs/v14/flow/production/tutorial-production-mode-basic.html
at com.vaadin.flow.server.DeploymentConfigurationFactory.verifyFolderExists(DeploymentConfigurationFactory.java:283) ~[flow-server-2.0.14.jar:2.0.14]
at com.vaadin.flow.server.DeploymentConfigurationFactory.readBuildInfo(DeploymentConfigurationFactory.java:222) ~[flow-server-2.0.14.jar:2.0.14]
at com.vaadin.flow.server.DeploymentConfigurationFactory.createInitParameters(DeploymentConfigurationFactory.java:166) ~[flow-server-2.0.14.jar:2.0.14]
at com.vaadin.flow.server.DeploymentConfigurationFactory.createPropertyDeploymentConfiguration(DeploymentConfigurationFactory.java:126) ~[flow-server-2.0.14.jar:2.0.14]
at com.vaadin.flow.spring.VaadinServletContextInitializer$SpringStubServletConfig.createDeploymentConfiguration(VaadinServletContextInitializer.java:747) ~[vaadin-spring-12.0.6.jar:na]
at com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener.contextInitialized(VaadinServletContextInitializer.java:289) ~[vaadin-spring-12.0.6.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4680) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) [tomcat-embed-core-9.0.22.jar:9.0.22]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_211]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.22.jar:9.0.22]
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_211]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) [tomcat-embed-core-9.0.22.jar:9.0.22]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_211]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.22.jar:9.0.22]
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_211]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:456) [tomcat-embed-core-9.0.22.jar:9.0.22]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:105) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) [spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at com.junologix.everflow14.Everflow14Application.main(Everflow14Application.java:22) [classes/:na]
The pdf-browser component was installed via bower and not npm.
My pom is as follow:
`
<properties>
<java.version>1.8</java.version>
<vaadin.version>14.0.7</vaadin.version>
<eclipselink.version>2.7.4</eclipselink.version>
</properties>
<profiles>
<profile>
<id>production</id>
<properties>
<vaadin.productionMode>true</vaadin.productionMode>
</properties>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-server-production-mode</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
<repositories>
<repository>
<id>Vaadin Directory</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>webjars</id>
<url>https://dl.bintray.com/webjars/maven</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- EclipseLink -->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
<version>${eclipselink.version}</version>
</dependency>
<!-- MYSQL JDBC connector -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- APACHE libs -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.3</version>
</dependency>
<!-- Vaadin addons -->
<dependency>
<groupId>com.github.appreciated</groupId>
<artifactId>app-layout-addon</artifactId>
<version>3.0.0.beta5</version>
</dependency>
<dependency>
<groupId>com.github.appreciated</groupId>
<artifactId>card</artifactId>
<version>0.9.4</version>
</dependency>
<dependency>
<groupId>org.vaadin.tabs</groupId>
<artifactId>paged-tabs</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.vaadin.alejandro</groupId>
<artifactId>pdf-browser</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.claspina</groupId>
<artifactId>confirm-dialog</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.vaadin.stefan</groupId>
<artifactId>fullcalendar</artifactId>
<version>1.9.2</version>
</dependency>
<!-- Tools -->
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>4.6</version>
<exclusions>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>`
I suspect it has something to do with the bower installed components but I'm not 100% certain. Reverting back to 14.0.3 the app load fine.
This is caused by #6405 and is fixed by either #6616 or alejandro-du/pdf-browser#4.
The first error encountered stops the application. Other third-party components in the application that contain flow-build-info.json in the JAR file will result in the same error and this is not limited to pdf-browser.
Hi.
The issue is as @integrigy commented in the fact that the flow-build-info.json is mistakenly packaged into some add-on jars.
This can also be fixed by adding the plugin
<!--
Take care of synchronizing java dependencies and imports in
package.json and main.js files.
It also creates webpack.config.js if not exists yet.
-->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
Which will generate the project flow-build-info.json which will then be used. Is the project generated from start.spring.io?
Thank you for the response. Yes, this project was started from spring.io. I will give your recommendations are try.
Thanks again
On Mon, Oct 7, 2019 at 12:30 AM caalador [email protected] wrote:
Hi.
The issue is as @integrigy https://github.com/integrigy commented in the fact that the flow-build-info.json is mistakenly packaged into some add-on jars.
This can also be fixed by adding the plugin
<plugin><groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> <version>${vaadin.version}</version> <executions> <execution> <goals> <goal>prepare-frontend</goal> </goals> </execution> </executions> </plugin>Which will generate the project flow-build-info.json which will then be used. Is the project generated from start.spring.io?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vaadin/flow/issues/6625?email_source=notifications&email_token=ACIXSWMMOJEZUXVP7FZBHELQNLCQPA5CNFSM4I5R6KJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAPCBXY#issuecomment-538845407, or mute the thread https://github.com/notifications/unsubscribe-auth/ACIXSWLKPABEII32QKRVXI3QNLCQPANCNFSM4I5R6KJA .
-- Regards, Allen
Everything works! Took awhile to update but now the app is running nicely.
Thank you, thank you