 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Chris Searle Guest
|
Posted: Wed Nov 19, 2003 3:58 pm Post subject: Oracle JDBC executeQuery() hanging with a to_char() in the s |
|
|
Calling statement.executeQuery() hangs, anyone experienced this? Using
the Oracle thin driver v9.2.0.1.0 running on a Solaris 8 box. The
code:
Connection connection = cdrDataSource.getConnection();
Statement statement = connection.createStatement();
String sql = "SELECT
TO_CHAR(SOFIXML.SOFI_LIB.SOFI_GET_XML('CA89352LAC42', NULL, NULL))
FROM DUAL";
ResultSet resultSet = statement.executeQuery(sql);
if(resultSet.next()) {
return resultSet.getString(1);
}
The SOFI_GET_XML function returns a CLOB and I'm using TO_CHAR() to
convert is into a VARCHAR2 for speed. Not doing a TO_CHAR and
processing the CLOB works fine but is a little slow. The query runs
fine through both TOAD and SQLPlus.
Thanks, Chris
|
|
| Back to top |
|
 |
Joe Weinstein Guest
|
Posted: Wed Nov 19, 2003 5:13 pm Post subject: Re: Oracle JDBC executeQuery() hanging with a to_char() in t |
|
|
Chris Searle wrote:
| Quote: | Calling statement.executeQuery() hangs, anyone experienced this? Using
the Oracle thin driver v9.2.0.1.0 running on a Solaris 8 box. The
code:
Connection connection = cdrDataSource.getConnection();
Statement statement = connection.createStatement();
String sql = "SELECT
TO_CHAR(SOFIXML.SOFI_LIB.SOFI_GET_XML('CA89352LAC42', NULL, NULL))
FROM DUAL";
ResultSet resultSet = statement.executeQuery(sql);
if(resultSet.next()) {
return resultSet.getString(1);
}
The SOFI_GET_XML function returns a CLOB and I'm using TO_CHAR() to
convert is into a VARCHAR2 for speed. Not doing a TO_CHAR and
processing the CLOB works fine but is a little slow. The query runs
fine through both TOAD and SQLPlus.
|
Very odd. What does the DBMS show this connection is doing? It may be
a driver/DBMS incompatibility where the driver thinks it's still
waiting for something from the DBMS, and the DBMS thinks the connection
is idle and has sent it all it is going to.
Joe Weinstein at BEA
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|