Error in a view defined in a screen, please specify the screen


On server launch the following error message can be seen when a property does not exist in a view defined locally in a screen xml.

It seems that the platform checks all views including the ones in screens the first time a view is required.

8:35:31.520 INFO  com.haulmont.cuba.core.sys.AbstractViewRepository - Initializing views
18:35:31.572 ERROR com.haulmont.cuba.core.sys.ServiceInterceptor - Exception: View ibusy2_SupplierOrderLine/ definition error: property agent doesn't exist
	at com.haulmont.cuba.core.sys.ViewLoader.loadViewProperties(
	at com.haulmont.cuba.core.sys.ViewLoader.loadViewProperties(
	at com.haulmont.cuba.core.sys.AbstractViewRepository.deployView(
	at com.haulmont.cuba.core.sys.AbstractViewRepository.init(
	at com.haulmont.cuba.core.sys.AbstractViewRepository.checkInitialized(
	at com.haulmont.cuba.core.sys.AbstractViewRepository.findView(
	at com.haulmont.cuba.core.sys.AbstractViewRepository.getView(
	at com.ibusy2.service.CompanyServiceBean.getCompanyOrNull(

As you can see the screen is not mentionned. And I have hundreds of screen and counting. It would be nice to mention it.

Especially when now the local views in screen are the ‘recommended’ way (yeepee hundreds and hundreds more views to maintain and unfetched errors that go with them, it’s christmas !)


This particular exception is caused by loading an inline view defined in the shared views.xml file.

You can define only named views, then you will be able to spot errors quickly - you will see the name like ibusy2_SupplierOrderLine/my-view.

Ok, it was not a view inlined in a screen, then, my bad.

Not sure if/when I will spend time renaming all internal views of my big views.xml file, but that’ts an option !

Thank you @krivopustov