Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
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 Source code of java.io.EOFException

STACKTRACE:

java.io.EOFException Source code of java.io.EOFException
  at
com.mysql.jdbc.MysqlIO Source code of com.mysql.jdbc.MysqlIO(MysqlIO.java:1845)
  at
com.mysql.jdbc.MysqlIO Source code of com.mysql.jdbc.MysqlIO(MysqlIO.java:2292)
  at
com.mysql.jdbc.MysqlIO Source code of com.mysql.jdbc.MysqlIO(MysqlIO.java:2788)
  at
com.mysql.jdbc.MysqlIO Source code of 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 Source code of com.mysql.jdbc.Connection(Connection.java:1309)
  at
com.mysql.jdbc.Connection Source code of 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)