Solution 1
Use adpatch utility to recompile the forms, relink libraries and invalid db objects (see here for more info How to recompile INVALID objects in Oracle EBS Database?)
Solution 2
This solutions works most of the time. And the reason is simple - sometimes there are dependencies in db objects, and if that's not sorted out then they wouldn't get recompiled by adadmin utility
1. Use 'utlirp.sql' to invalidate all the db objects first.
2. Now use 'utlrp.sql' to recompile all the objects.
In order to use these sql files do the following:
1. Setup database environment at the unix terminal (see here for more info How to setup environment for Database Tier at linux terminal?)
2. Change directory to:
cd $ORACLE_HOME/rdbms/admin
3. Login as SQLDBA at sqlplus
sqlplus '/as sysdba'
SQL> @utlirp.sql
4. Once this finishes, then
SQL> @utlrp.sql
Environment