ADF, ADF Exceptions

ADF java.lang.ClassCastException: …ViewRowImpl cannot be cast to …ViewRow ?

For example:
java.lang.ClassCastException: model.DepartmentsViewRowImpl cannot be cast to model.common.DepartmentsViewRow

JDeveloper, when generating View Object Row client interface sometimes goes wrong with class definition. Such error can be displayed when implementation of class is not defined. In particular error sample –  “implements DepartmentsViewRow” is missing in DepartmentsViewRowImpl class:

public class DepartmentsViewRowImpl extends ViewRowImpl implements DepartmentsViewRow {

}