Throw exception if View class is not found.

Closes #4955