According to the Spring forum, this is caused by a bad connection from the pool, and can be solved by providing a test sql to the pool.
OCUP UML fundamental and ITIL foundation
Joined: Feb 24, 2004
on execution of cs = conn.prepareCall(sql) , it returns callablestatement cs which is bad.
so whereever I use cs in the code after above exeuction. It throws errors "Statement is closed" so Problem starts happening before it executes cs.execute() and thus data is not an issue.
I had set up parameter preTestSqlString for preTesting but still it's throwing the same Exception. But when I digged more in the preTestSql instructions , I seem to have missed out one of the steps. So I am trying to set up the preTestSQL again.
Let me know if anyone has more inputs. Your help is appreciated.