While working with Puppet, I recently received the following error:
# puppet agent --no-daemonize --verbose --onetime --test
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find parent resource type 'users::virtual' of type hostclass in production at /etc/puppet/modules/users/manifests/sysadm.pp:2 on node test.example.com
warning: Not using cache on failed catalog

The error, the users::virtual class was not in a file of the same name.
Renaming the file containing the users::virtual class to virtuals.pp in the users module fixed the problem.