Hi Venkat,
I dont really know what do to in oracle for this type of error, but i am using MySql4.0 and in my client, i can see some variables like Table_locks_waited,Table_locks_immediate, wait_timeout. May be
you should try to find corressponding variables to set, so that your query waits for certain time to get back the results.