When I test, if the flag is "false" and proxy was never generated, there is an error.

How you can build the proxy is autoGenerate== false and the class doesn't exists ?