Navigator throws ServiceException with unknown state''

Hi there,
I just started Vaadin and so far so good - it really looks promising, however I really struggle with the Navigator. I tried so many things I found on the internet, but none seems to work. I would appreciate it, if you guys can tell me, what I am doing wrong. Here is my source code

public class BasicInformation extends UI {

    public static final String VIEW_NAME_BASIC = "basic_view";
    public static final String VIEW_NAME_ADV = "advanced_view";

    private Navigator nav;
    private static final long serialVersionUID = 2548993131483469880L;

    protected void init(VaadinRequest vaadinRequest) {

        HorizontalLayout layout = generateContent();
        nav = new Navigator(this,this);
        nav.addView(VIEW_NAME_ADV, new AdditionalInformation());
        //this doesnt work either
        //nav.addView(VIEW_NAME_BASIC,  (Class<? extends View>) BasicInformation.class);

    private HorizontalLayout generateContent(){
        HorizontalLayout layout = new HorizontalLayout();
        FormLayout form = new FormLayout();

        OptionGroup single = new OptionGroup("Gender");
        single.addItems("Male", "Female");

        TextField tfFirstname = new TextField("First Name");

        TextField tfFamilyName = new TextField("Family Name");

        TextField tfEmail = new TextField("E-mail");

        Button btSave = new Button("Save and Proceed");

        btSave.addClickListener(new Button.ClickListener() {

            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {
        return layout;

    @WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
    @VaadinServletConfiguration(ui = BasicInformation.class, productionMode = false)
    public static class MyUIServlet extends VaadinServlet {

        private static final long serialVersionUID = 1L;


public class AdditionalInformation extends VerticalLayout implements View {

    private static final long serialVersionUID = 1578488973205488083L;
    public AdditionalInformation(){
        Label lbl = new Label("Whatever");
    public void enter(ViewChangeListener.ViewChangeEvent event) {
        // TODO Auto-generated method stub


You didn’t assign a view for the empty URI/view name/state

Add something like

nav.addView("", new AdditionalInformation()); or set a new start view during the UI.init() with

nav.getStateManager().setState(VIEW_NAME_ADV); But this will not prevent you from users that type in a wrong URI.
Therefore you should at least set an ErrorView which is the navigator’s fallback if no URI matches: