Vaadin 14 LTS release

Klaus Beyer-Meklenburg:
Please try again. The field now accepts personal addresses, as well.

I was able to download the PDF file. Thank you!

I believe 14.0.6 was announced a little while ago, so I started using it. But the website claims latest is 14.0.5. How come?

I started using Vaadin 14 with excitement about 2 weeks ago for a web platform project. I have successfully created an app using AppLayout, multi lingual that currently allows for a self service account sign up and sign in process that runs well on my development machine using localhost:8080 with Spring Boot.

However, despite reading the materials and following instructions, I am unable to successfully deploy my app as a War file to a Tomcat 9 server I have just built on a cloud service.

Can someone try the following and tell me the correct steps for a successful outcome:

  1. Create a project using the Vaadim 14 Starter new project in Eclipse.
  2. Verify it works on your local machine.
  3. Build and deploy to a separate web server
  4. Successfully run it on the server
  5. Report back the actual steps that made it successful.

I will then compare to what I was doing and adjust (even rebuild) my app.
Note: I have read book of vaadin 14 on deployment. I have also read the Spring boot deployment instructions. I have been stumbling with old vaadin 8 documentations and questions, so I am trying to work with a pristine vaadin 14 only method.

The issues I have been hitting on the server side vary depending on what I try to fix in eclipse:

  1. Vaadin jars not deployed. Fixed by a “Quick Fix” on a classpath issue in eclipse.
  2. Server says MainView. does not exist: Solved by removing the parameter in MainView constructor.
  3. Server says that my app is not a Servlet; I am using @WebServlet annotation on the MainView class that extends a VerticalLayout. So , I created a new class just to be the @WebServlet extending VaadinServlet and instanciating MainView.

I am still not succeeding after 2 days of this. I am hoping to get feedback on a end-to-end test using the Vaadin starter project.

Thanks in advance.

jon martin solaas:
I believe 14.0.6 was announced a little while ago, so I started using it. But the website claims latest is 14.0.5. How come?

Ah, there is a bug in 14.0.6 … https://vaadin.com/forum/thread/17857413/internal-error-500-unable-to-read-webpack-stats-file

Mario Guzzi:
I started using Vaadin 14 with excitement about 2 weeks ago for a web platform project…

Is your project Maven-based? If so post your pom.xml in some development/QA part of the forum. If it is an “eclipse-internal” project it’s “impossible” to see what’s wrong, any description of what do and doesn’t happen would have helped, though …

Here are steps I just took to run war in Tomcat 9

  1. Create WAR project with Vaadin using Spring Boot Starter
  2. Make sure you don’t use 14.0.6, downgrade to 14.0.5 if needed
  3. Add a simple view class, for instance extending VerticalLayout, add @Route(“”) and add a Label or some other component in a @PostConstruct method (or constructor)
  4. To run it “locally”:
    $ mvn spring-boot:run
    (I’m sure Eclipse can import the pom.xml and you can set it up to run in Eclipse as you are used to)
  5. To run in standalone Tomcat
    $ cp target/yourapp-1.0.0-SNAPSHOT.war $CATALINA_HOME/webapps/ROOT.war

Point being: Keep your “master” project definition outside Eclipse in a pom.xml. Don’t let Eclipse create an “internal” project with a wizard for you, then you are stuck on Eclipse and it’s very difficult to share setup with others when you need help. It’s better to have Eclipse import the pom.xml. Then you are in control and not Eclipse :slight_smile:

Mario Guzzi:
I started using Vaadin 14 with excitement about 2 weeks ago for a web platform project. I have successfully created an app using AppLayout, multi lingual that currently allows for a self service account sign up and sign in process that runs well on my development machine using localhost:8080 with Spring Boot.

However, despite reading the materials and following instructions, I am unable to successfully deploy my app as a War file to a Tomcat 9 server I have just built on a cloud service.

Can someone try the following and tell me the correct steps for a successful outcome:

  1. Create a project using the Vaadim 14 Starter new project in Eclipse.
  2. Verify it works on your local machine.
  3. Build and deploy to a separate web server
  4. Successfully run it on the server
  5. Report back the actual steps that made it successful.

I will then compare to what I was doing and adjust (even rebuild) my app.
Note: I have read book of vaadin 14 on deployment. I have also read the Spring boot deployment instructions. I have been stumbling with old vaadin 8 documentations and questions, so I am trying to work with a pristine vaadin 14 only method.

The issues I have been hitting on the server side vary depending on what I try to fix in eclipse:

  1. Vaadin jars not deployed. Fixed by a “Quick Fix” on a classpath issue in eclipse.
  2. Server says MainView. does not exist: Solved by removing the parameter in MainView constructor.
  3. Server says that my app is not a Servlet; I am using @WebServlet annotation on the MainView class that extends a VerticalLayout. So , I created a new class just to be the @WebServlet extending VaadinServlet and instanciating MainView.

I am still not succeeding after 2 days of this. I am hoping to get feedback on a end-to-end test using the Vaadin starter project.

Thanks in advance.

For running a V14 application on a different machine than the development machine you should
create a production build as the files and folder paths will not be available on the other machine.

For the maven build it would mean having

<build>
  <plugins>
    <plugin>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-maven-plugin</artifactId>
      <version>${vaadin.version}</version>
      <executions>
        <execution>
          <goals>
            <goal>prepare-frontend</goal>
            <goal>build-frontend</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

when building the WAR that is to be deployed. It would also be recommended to use production mode,
but it’s not 100% necessary when running build-frontend.

For the starters this is automatic in the production profile. [Production mode]
(https://vaadin.com/docs/flow/production/tutorial-production-mode-basic.html)

  • Mikael

Mikael Grankvist:

For running a V14 application on a different machine than the development machine you should

Just for the record, my example above was all run on one machine. Deployed on a fresh tomcat, tough. I don’t really think the build does something “magic” to the machine itself, so I think the steps described are still valid. Or am I missing something here? I also think building a Spring Boot über-jar instead would eliminate the tomcat-on-other-host-problem entirely.

Success! A few things that contributed to the solution:

  1. Production Mode. This was specified as follows in a eclipse build config:
    spring-boot:run -Pproduction
  2. Tomcat needed the start class which I specified in the POM as:
    My.package.path.MainView
  3. Applying an eclipse “quick fix” to a warning about a path that would not get exported.

I have applied this method to my project, and also was successful.
Many thanks!