I've encountered this infrequently. As I recall, the error was due to some type of syntax error that the PL/SQL Engine didn't recognize. I recommend commenting out your Program Unit to the point where you basically just have the shell of the program unit and slowly uncomment lines until you find the line or lines that is causing the compilation error. It could also be due to referencing a construct that is not recognized by the PL/SQL engine. Are you using database features that are not supported by Forms (like RDBMS 11g features that have not been implemented in Forms yet)?
What database version are you using? Can you show us your code?