PLS-00801 is by definition an Oracle Server bug. In situations where a compilation works correctly in SQL*Plus, the problem is most likely related to debug information. To work around this, you can disable the debugger preference