Like the title says, I am getting that error when I am trying to save a certain apex class. I am able to save other apex classes, just not this one.
Most of what I have seen says that this error is given by the database, and is related to DML statements or history tracking of fields on objects. My class does not have any SObjects in it. It is a generated class from a SOAP WSDL, so it never puts anything in the database at all. All sub-classes and fields it uses are declared within the class, so it shouldn't be dependent on any other apex class.
The only other thing I read is that it could have something to do with workspaces, so I tried creating a new workspace in the dev console, and switched back and forth between workspaces to see if it would save correctly then. It made no difference.
I have also tried saving the class from the dev console, as well as ForceCode, a plugin that lets you develop in VSCode. I get the same result from both environments.
I'm really stumped with this one. I'm wondering if there is something incompatible in the generated code, which really means going back and changing the SOAP service just so I can get the WSDl generated class to be different.
Btw, the class is generated using wsdl2apex through Eclipse's plugin, Force.com.
//Generated by wsdl2apex is at the top of the class.