We should change our module loading code such that it doesn’t report a noisy message like this in the case of something that is expected behavior.
Simplistic approach is to just catch this error and do something like:
log.debug("$moduleName refers to missing extension class $classname.")
A bit nicer for the end user would be to special-case the classnames that used to be in openmrs-core and are now in the legacyui module and do something like:
log.info("$moduleName is trying to add an item to the legacy admin UI. If you want to see this, then install the Legacy UI module")
The correct fix would probably be to change the openmrs-core module framework to allow modules to indicate whether an extension is required or not (defaults to false), and so if a required extension is missing we should fail hard, but if it’s optional then we don’t need a noisy error message. (I do not think this is worth the effort.)