multiplatform runtime, Vaadin 7 not getting to website

When I go to localhost:8080, instead of pulling up my website or getting to one of my break points, it is pulling up some directory structure. I don’t recognize anything in the directory structure. I followed the migration steps defined at https://vaadin.com/docs/v13/mpr/introduction/step-1-maven-v7.html as closely as possible. Obviously, my app is much more complex and different then the simple example in the guide, but I am pretty sure I made good decisions based on the guide. So what kind of problem would cause what I am seeing? What is really confusing me is that I am not getting to any of my break points. I could understand if maybe I messed up on the routing step ( I tried to use the https://vaadin.com/docs/v13/mpr/introduction/step-3-navigator.html#mixed-navigation-and-routing step as it seemed the best option long term ), but I don’t see how it is not getting to my breakpoints.

I even used the example [here]
(https://vaadin.com/docs/v13/flow/migration/8-migration-example.html) and made http://localhost:8080/hello, which gives me “not found”:

package com.mobiwms.website;

import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.H1;
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.Route;

@Route("hello")
@PageTitle("My")
public class HelloWorldPage extends Div {
   /**
	 * 
	 */
	private static final long serialVersionUID = -8909443659085565928L;

	public HelloWorldPage() {
       this.add(new H1("Hello World!"));
   }
}

Maybe I need to do something special to run it with maven and Jetty???

Some additional pieces of information:

  1. Nothing happens when I run it in Jetty/Eclipse. I mean, no logging, no break points reached, I only see “Restart completed …”, and logging only changes when I make code changes
  2. If I remove MprWidgetSet from my MainView, nothing changes. Strictly speaking, the only thing in my widget set XML file is the add-ons, and the documentation says I don’t need it by default, so removed MprWidgetSet from my MainView
  3. When I package the war file and download it to my tomcat server, setting up the url as localhost/turnsmithmprv1, it does not go to turnsmithmprv1 ( turnsmithmprv1.xml ), but to the root application ( ROOT.xml ).

Please tell me what other information you need.

When I go to localhost:8080, instead of pulling up my website or getting to one of my break points, it is pulling up some directory structure. I don’t recognize anything in the directory structure. I followed the migration steps defined at https://vaadin.com/docs/v13/mpr/introduction/step-1-maven-v7.html as closely as possible. Obviously, my app is much more complex and different then the simple example in the guide, but I am pretty sure I made good decisions based on the guide. So what kind of problem would cause what I am seeing? What is really confusing me is that I am not getting to any of my break points. I could understand if maybe I messed up on the routing step ( I tried to use the https://vaadin.com/docs/v13/mpr/introduction/step-3-navigator.html#mixed-navigation-and-routing step as it seemed the best option long term ), but I don’t see how it is not getting to my breakpoints.

I even used the example [here]
(https://vaadin.com/docs/v13/flow/migration/8-migration-example.html) and made http://localhost:8080/hello, which gives me “not found”:

package com.mobiwms.website;

import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.H1;
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.Route;

@Route("hello")
@PageTitle("My")
public class HelloWorldPage extends Div {
   /**
	 * 
	 */
	private static final long serialVersionUID = -8909443659085565928L;

	public HelloWorldPage() {
       this.add(new H1("Hello World!"));
   }
}

And I also tried this:

package com.mobiwms.website;

import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.H1;
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.Route;

@Route("")
@PageTitle("My")
public class HelloWorldPage extends Div {
   /**
	 * 
	 */
	private static final long serialVersionUID = -8909443659085565928L;

	public HelloWorldPage() {
       this.add(new H1("Hello World!"));
   }
}

I don’t even know where it is getting to in the the app. How can I find out what is happening?

Maybe I need to do something special to run it with maven and Jetty???

Some additional pieces of information:

  1. Nothing happens when I run it in Jetty/Eclipse. I mean, no logging, no break points reached, I only see “Restart completed …”, and logging only changes when I make code changes
  2. If I remove MprWidgetSet from my MainView, nothing changes. Strictly speaking, the only thing in my widget set XML file is the add-ons, and the documentation says I don’t need it by default, so removed MprWidgetSet from my MainView
  3. When I package the war file and download it to my tomcat server, setting up the url as localhost/turnsmithmprv1, it does not go to turnsmithmprv1 ( turnsmithmprv1.xml ), but to the root application ( ROOT.xml ).
  4. web.xml file still there, but virtually empty

Please tell me what other information you need.

I have tried almost everything in the documentation, nothing works. I thought the multiplatform runtime was supposed to make things a little easier. Has anyone else had such problems?

What is weird is that I have this code( only part of the class, lots of other stuff ) and it is not getting to the breakpoint at add(content);. I thought using the “@Route” should send us here, at least according to the “Legacy Navigator Only” documentation [here]
(https://vaadin.com/docs/v13/mpr/introduction/step-3-navigator.html#no-mixing). Since I cannot even get to this break point, I cannot confirm that I ever create the navigator. So, is there a way to see what is happening?

@Viewport("width=device-width")
@Widgetset("com.mobiwms.website.WmsWidgetSet")
@Title("Turnsmith 2.0")
@SuppressWarnings("serial")
@MprTheme("mobiwms")
@Route("")
public final class WmsUI extends Div implements HasLegacyComponents  {

	/*
	 * This field stores an access to the dummy backend layer. In real
	 * applications you most likely gain access to your beans trough lookup or
	 * injection; and not in the UI but somewhere closer to where they're
	 * actually accessed.
	 */
	private Timer timer = null;
	private TimerTask timerTask = null;
	private boolean loggingOut;
	private static final Logger LOGGER = Logger.getLogger(WmsUI.class.getName());
	private HorizontalLayout content = new HorizontalLayout();

	public WmsUI() {		
		add(content);
		...
	}
}

Removing web.xml got me past this problem, and got me to a new problem, which I am still researching. Since removing or changing web.xml is no where in the documentation, it did not even occur to me to try that. Once I get it working, I will report back here for people.

Since removing or changing web.xml is no where in the documentation

Yes, that is somewhat true. There is mentioning that you need to remove legacy servlets. These can be defined in your project either with annotations or web.xml. So depending how your app has been configured you need to remove either one of those.

https://vaadin.com/docs/v13/mpr/introduction/step-2-legacy-servlets.html

Ok, in case anyone is wondering, even when I just had the following web.xml, it did not work ( with above directory listing only, not getting to website ):

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
	<display-name>vaadinwebsite</display-name>
</web-app>

So I had to completely remove src/main/webapp/WEB-INF/web.xml to get it to work. It did not care if WEB-INF was there or not, just did not like my web.xml files for some reason. Not a huge deal in my case as I don’t need web.xml at the application level, but thought I would mention it in case anyone else finds this thread.