vivekanand Binod jha wrote:... which calls a stored procedure in DB...
Stored procedures are very powerful. They are also horribly misused, and in some case I've seen, misused to the point where not only was the application permanently wedded to a specific brand of database, but fully half the source code to the application wasn't in the source code archives, it was in the database.
It's very likely that this particular stored procedure is doing some very heavy processing inside the database server. JDBC requests are synchronous, so until ALL processing is complete, the fetch/execute operation for a given SQL statement will "hang" on the attempt. So before worrying about the Java, I'd first get the DBA to help tune the stored procedure.
An IDE is no substitute for an Intelligent Developer.