Locating JDBC Issues

The main causes of JDBC issues are as follows:

  1. Applications or application framework errors
  2. JDBC function errors
  3. Improper database configurations

There are mainly three types of JDBC issues:

  1. An error is reported during execution, and JDBC throws an exception.
  2. The execution duration is abnormally long.
  3. A feature is not supported. The JDBC has not implemented the required JDK interface.

The following table describes JDBC issues in detail.

Table 1 JDBC issues

Type

Cause

Database Connection Fails

The JDBC client configuration is incorrect. For example, the URL format is incorrect, or the user name or password is incorrect.

The network is abnormal.

A JAR package conflict occurs.

The database configuration is incorrect. The remote access permission has not been configured for the database.

Service Execution Exceptions

The input SQL statement is incorrect and is not supported by the kernel.

The kernel has a bug. An error occurs during service processing, and an abnormal packet is returned.

Network fault.

The database connection times out, and the socket is closed.

Performance Issues

The SQL execution by the kernel is slow.

The result set is too large. As a result, the application segment responds slowly.

The passed SQL statement is too long and the JDBC parsing is slow.

Function Support Issues

The JDK does not provide standard APIs.

The JDBC does not implement the APIs.