  | | | CommunicationsException with bind variables in subquery | CommunicationsException with bind variables in subquery 2005-07-20 - By davinder singh
Back Hi,
I get com.mysql.jdbc.CommunicationsException when I try to execute following query using jdbc: "select ai_trn from tr_trn where id_str_rt = ? and id_ws = ? and ts_crt_rcrd = (select max(ts_crt_rcrd) from tr_trn where id_str_rt = ? and id_ws = ?)"
However, if I remove bind variables from subquery, it works fine. "select ai_trn from tr_trn where id_str_rt = ? and id_ws = ? and ts_crt_rcrd = (select max(ts_crt_rcrd) from tr_trn)" executes correctly.
Other details are: Connector: mysql-connector-java-3 (See http://ava-3.ora-code.com).1.6-bin.jar Server: mysql-standard-4 (See http://ard-4.ora-code.com).1.9-apple-darwin7.7.0-powerpc OS: Mac OS X 10.3.8 Java: 1.4.2_05
Stacktrace is given below. Please help.
Thanks, Dav.
***************************************************************** com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException 
STACKTRACE:
java.io.EOFException  at com.mysql.jdbc.MysqlIO (MysqlIO.java:1845) at com.mysql.jdbc.MysqlIO (MysqlIO.java:2292) at com.mysql.jdbc.MysqlIO (MysqlIO.java:2788) at com.mysql.jdbc.MysqlIO (MysqlIO.java:1534) at com.mysql.jdbc.ServerPreparedStatement.serverPrepare(ServerPreparedStatement .java:1485) at com.mysql.jdbc.ServerPreparedStatement.<init>(ServerPreparedStatement.java:151) at com.mysql.jdbc.Connection (Connection.java:1309) at com.mysql.jdbc.Connection (Connection.java:1281) *****************************************************************
-- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/java?unsub=mysql@(protected)
|
|
 |