I ended up with this error because the class name I was referencing was
ClassNameXML but I was trying to call it as
Not following naming conventions combined with not calling a class by its properly capitalized name will trigger this. I burned an hour figuring this out. I hope you don’t have to.