VerticalSplitPanel with errrors

i am using JavaEE7, vaadin 8 and wildfly 13
I want to add a View with a VerticalSplitPanel.
But i get the error:

Split panel can contain only two components

But i want only add two components to the VerticalSplitPanel.

This is my Code

    ...
	private VerticalSplitPanel mainContent;
	private VerticalLayout personContent;
	private Grid<Person> personGrid;
	private HorizontalLayout addressCommunicationContent;
	private AddressView addressView;
	private CommunicationView communicationView;

	public PersonView() {
		i18n = new I18n();
		setSizeFull();
		setMargin(new MarginInfo(false, true, true, true));
		setWidth("1200px");
	}

	@PostConstruct
	void init() {
		
		mainContent = new VerticalSplitPanel();
		mainContent.setSplitPosition(50, Unit.PERCENTAGE);
		mainContent.setSizeFull();

		personContent = new VerticalLayout();
		personContent.setWidth("100%");
		addressCommunicationContent = new HorizontalLayout();
		addressCommunicationContent.setWidth("100%");
		
		saveModus = SaveModus.UPDATE;
		selectedPersons = new HashSet<Person>();
		selectedPerson = new Person();
		newPerson = new Person();

		personGrid = new Grid<Person>();
		personGrid.setWidth("100%");
		personContent.setMargin(false);

		List<Person> personList = personService.getPersonDAO().findAll();
		personList.sort(Comparator.comparing(Person::getLastName));

		DataProvider<Person, ?> dataProvider = DataProvider.ofCollection(personList);
		personGrid.setSelectionMode(SelectionMode.MULTI);

		personGrid.addSelectionListener(event -> {
			selectedPerson = new Person();
			selectedPersons = new HashSet<Person>();
			selectedPersons = event.getAllSelectedItems();
			if (selectedPersons.size() == 0) {
				addressCommunicationContent.removeComponent(addressView);
				addressCommunicationContent.removeComponent(communicationView);
				mainContent.removeComponent(addressCommunicationContent);
			} else {
				selectedPerson = getTheSelectedPerson(selectedPersons);
				if (selectedPerson != null) {
					showAddresses(selectedPerson);
					showCommunication(selectedPerson);
					mainContent.addComponent(addressCommunicationContent);
				}
			}
		});

		personGrid.getEditor().setEnabled(true);
		personGrid.getEditor().addSaveListener(event -> {
			selectedPerson = event.getBean();
			if (saveModus == SaveModus.UPDATE) {
				selectedPerson = new Person();
				updateRow(selectedPerson);
			} else {
				newPerson = new Person();
				createPerson(newPerson);
			}
		});

		personGrid.getEditor().addCancelListener(event -> {
			if (saveModus == SaveModus.UPDATE) {
				selectedPerson = new Person();
				selectedPerson = event.getBean();
			} else {
				newPerson = new Person();
				newPerson = event.getBean();
				deletePerson(newPerson);
			}

		});

		personGrid.setDataProvider(dataProvider);

		personGrid.addColumn(Person::getFirstName).setCaption(i18n.PERSON_SURNAME).setEditorComponent(txfFirstName,
				Person::setFirstName);
		personGrid.addColumn(Person::getLastName).setCaption(i18n.PERSON_LASTNAME).setEditorComponent(txfLastName,
				Person::setLastName);
		personGrid.addColumn(Person::getComment).setCaption(i18n.BASIC_COMMENT).setEditorComponent(txfComment,
				Person::setComment);

		Button add = new Button("+");
		add.addClickListener(event -> {
			saveModus = SaveModus.NEW;
			addRow();
		});

		Button delete = new Button("-");
		delete.addClickListener(event -> deleteRow(selectedPersons));

		Button detail = new Button("", ev -> {
			if (getTheSelectedPerson(selectedPersons) != null) {
				getUI().addWindow(new PersonDetailView(this, getTheSelectedPerson(selectedPersons)));
			}
			refreshGrid();

		});
		detail.setIcon(VaadinIcons.PENCIL);

		CssLayout personNavBar = new CssLayout(add, delete, detail);
		personNavBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);

		personContent.addComponent(personGrid);
		personContent.addComponent(personNavBar);

		mainContent.setFirstComponent(personContent);
		mainContent.setSecondComponent(addressCommunicationContent);
		addComponent(mainContent);
	}

The error is most likely produced by this line:

mainContent.addComponent(addressCommunicationContent);

Since it may be executed after initial setup, when there are already two components in split panel

mainContent.setFirstComponent(personContent);
mainContent.setSecondComponent(addressCommunicationContent);

thanks now it works