According to the Oracle documentation,
" The ORA-01001 error occurs when:
A host language program call gave an invalid cursor for use
The value of the MAXOPENCURSORS option in the precompiler command was too small
You can fix the ORA-01001 error by:
1.Check your problematic call statement for any issues
2Specify a correct LDA area or open the cursor as required
3.As a last resort, increase the MAXOPENCURSORS option value before precompiling
As a note, the ORA-01001 error does not exist in Oracle 10g"
After debugging for almost a day following the above hints, I came to realise there is nothing wrong with my PL/SQL or with the configuration settings.
Sporadic "ORA-01001: invalid cursor" error occurs in Oracle 11g if there are RAM memory issues on the server.
If the same client call works once and fails the other minute with this error, you can check the server for memory issues before debugging further.