Well, open the libraries in forms builder, compile them and navigate to the faulty SQL Statements. If in doubt post them here; but of course we can't know if calls to your_package.your_function are really correct, so you'd need to verify that for yourself.
So? There are some built-ins removed in 11g which where obsolete in 10g but didn't throw compile errors (run_product for example). As we don't know your source code we don't know which built ins you used and what caused the error. Please do what all develpers do when they encounter compile errors: look at the code where the error is thrown. If you can't understand why the compile error occured please post the code in doubt, but without knowing what caused the error my guess is as good as yours.
While facing compilation errors in forms pls check...
1.Does any of ur forms supports Graphics which is no longer supported in Forms 11g.
2.Does it any of ur forms supports Triggers, code e.g. using OLE2 without using Webutil..
3.Even icons and passwords r Case Sensetive
4.Forms during compilation may have in-consistancy between package Specification and Bodies...
Pls before migrating read Oracle Forms 11g Migration Documentation to see the desupported Built in
Regarding ur SQL Statment Error u might need to upgrade to ORACLE 10.2.0.3 to Solve such a problem
Mine was working fine in 10gR2 too and threw compile errors when compiling with 11gR2. There were in fact compile errors (run_product calls for example) so this means nothing.
And you got this error at what line in your code? Could you please post the line in doubt?
I had some troubles compiling my libraries with the 11gR2 compiler (it died randomly) which I overcame with reports compiler: I converted the libraries to a pld with the 10g reports compiler and converted the text files to a pll with the 11g reports compiler. after that the forms compiler was happy to compile the libraries.
In thint that Christian's idea is good. It is easy to export the .PLL with your Forms 10g Builder to a .PLD, via the File -> Convert... menu. You get an .PLD, then you can do the opposite in the Forms 11g builder via the same File -> convert menu option.