Click to See Complete Forum and Search --> : output full sql from a callablestatement


webdeveloperman
03-04-2008, 12:40 PM
I am new to Java so please forgive me for my lack of explanation


We use callablestatements in our java web application. There are many dynamic prepared statments that get processed from all over the application. We have a class called GenMsgDataManager in which these statement gets processed.

We have some oracle errors appearing occasionally like ORA-01000 and we need to better diagnose these issues we wanted to output the actual sql for the callable statements.

I tried doing Logger.error(null, method, "Look Here2:" + stmt.toString(), trackid, null);

However all this outputs "Look Here2" and the class/ package name (ie: com.ibm.ws,rsadapter....).

How can I out put the actual sql statement so that we could debug better.

Thank You-