If you somehow get into this nasty problem, you have probably made some big mistake and now you are missing entity definition in your database. To quickly fix that you need to recreate it, you can use drush for it. So if you are lucky find in code where this entity was added, probably in some hook_update in module.install file