This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The problem, I think, is that when an exception is thrown, your code throws away all the information in the exception and just displays something generic in the response. You should at least log the exception before doing that.
The reason I think this is the problem is that when you have "select ... form ..." instead of "select ... from ...", as your posted code does, then an exception will be thrown telling you that your SQL is not well-formed. But since you ignore the exception, you have no way of telling that.
Joined: Sep 10, 2012
but still iam unable to execute
exception thrown is
java.sql.BatchUpdateException: error occurred during batching: ORA-02291: integrity constraint (SYSTEM.FK_PILOT) violated - parent key not found
That's good -- at least you have an error message. Now you need the full stack trace, not just the error message. It will tell you what line of code threw the exception, and that's where you should start looking. So you should write out the full stack trace when an exception is thrown, and you can do that by calling the exception's "printStackTrace()" method.