Oracle 5.0 Reference Manual page 2141

Table of Contents

Advertisement

Troubleshooting Connector/J Applications
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1392)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:1414)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:625)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1926)
at com.mysql.jdbc.Connection.<init>(Connection.java:452)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
The error probably indicates that you are using a older version of the Connector/J JDBC driver (2.0.14
or 3.0.x) and you are trying to connect to a MySQL server with version 4.1x or newer. The older drivers
are not compatible with 4.1 or newer of MySQL as they do not support the newer authentication
mechanisms.
It is likely that the older version of the Connector/J driver exists within your application directory or your
includes the older Connector/J package.
CLASSPATH
21.3.15.8: My application is deployed through JBoss and I am using transactions to handle the
statements on the MySQL database. Under heavy loads, I am getting an error and stack trace,
but these only occur after a fixed period of heavy activity.
This is a JBoss, not Connector/J, issue and is connected to the use of transactions. Under heavy loads
the time taken for transactions to complete can increase, and the error is caused because you have
exceeded the predefined timeout.
You can increase the timeout value by setting the
attribute to the
TransactionTimeout
within the
file (pre-4.0.3) or
TransactionManagerService
/conf/jboss-service.xml
/
for JBoss 4.0.3 or later. See
TransactionTimeout
within the JBoss wiki
deploy/jta-service.xml
for more information.
21.3.15.9: When using gcj, a
exception is raised when
java.io.CharConversionException
working with certain character sequences.
This is a known issue with
which raises an exception when it reaches an unknown character or
gcj
one it cannot convert. Add
to your connection string to force
useJvmCharsetConverters=true
character conversion outside of the
libraries, or try a different JDK.
gcj
21.3.15.10: Updating a table that contains a
primary key
that is either
or compound
FLOAT
primary key that uses
fails to update the table and raises an exception.
FLOAT
Connector/J adds conditions to the
clause during an
to check the old values of the
WHERE
UPDATE
primary key. If there is no match, then Connector/J considers this a failure condition and raises an
exception.
The problem is that rounding differences between supplied values and the values stored in the
database may mean that the values never match, and hence the update fails. The issue will affect all
queries, not just those from Connector/J.
To prevent this issue, use a primary key that does not use FLOAT. If you have to use a floating point
column in your primary key, use
or
types in place of FLOAT.
DOUBLE
DECIMAL
21.3.15.11: You get an
[2920]
exception, even though the binary
ER_NET_PACKET_TOO_LARGE
blob size you want to insert using JDBC is safely below the
[466]
size.
max_allowed_packet
This is because the
method in
hexEscapeBlock()
may almost double the size of your
com.mysql.jdbc.PreparedStatement.streamToBytes()
data.
21.3.15.12: What should you do if you receive error messages similar to the following:
"Communications link failure – Last packet sent to the server was X ms ago"?
Generally speaking, this error suggests that the network connection has been closed. There can be
several root causes:
2121

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents