Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How do I get the JDBC SQL Statement that threw an error?
Hello,
I'm using an Oracle JDBC driver (OracleJDBC_r1-2.jar) to access an Oracle 8.1.7 database. I'm developing an application using Struts here, but I'm a complete newbie on this.
The problem I have is that my application often throws database exceptions, e.g. "invalid column name". But I can't see the SQL statement, because the Oracle JDBC driver doesn't display them.
A colleague of mine has written a "TracingJDBCDriver" around the Oracle driver in order to display the SQL statements, but this Driver doesn't work on my computer here - we've already spent hours on this but we don't know why.
Well, I tried it from the database side, with the following statement:
select distinct s.program, a.* from v$session s, v$sqltext a
where s.sql_hash_value = a.hash_value
and s.sql_address = a.address
and s.schemaname='AENDMGMT'
order by a.address, a.hash_value, a.piece
/
I get SQL-statements displayed. But the statements that are wrong are not in v$sqltext and they don't seem to be in any of the v$sql...-views.
My question is: Does anybody know in which view I can find these statements that were not correct?
Thank you very much
Uwe (greenFrog)
Received on Tue Dec 14 2004 - 05:07:07 CST
![]() |
![]() |