OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Connector/J

V2.4.2
  • What is OceanBase Connector J?
    • Compatibility requirements
    • Overview of OceanBase Connector/J
  • Install Driver
    • Install and load the OceanBase Connector/J driver
  • Instructions
    • Quick start
      • Import packages
      • Create a database connection
      • Create a Statement object
      • Run queries and retrieve ResultSet objects
      • Process ResultSet objects
      • Close ResultSet and Statement objects
      • Manage tables and data
      • Commit changes
      • Close a database connection
      • Example
    • Data sources and URL
      • Data source overview
      • Data source characteristics and properties
      • Create and connect to a data source instance
      • Database URL
    • Java data streams
      • Overview of Java data streams
      • LONG and LONG RAW data types
      • Use LOBs
        • Overview of LOB data types
        • LOB data interface
        • LOB locator API
      • CHAR, VARCHAR, and RAW data types
    • Statement caching
      • Overview of statement caching
      • Use statement caching
      • Reuse statement objects
    • Use CallableStatements to call stored procedures
    • Handle SQL exceptions
    • Result set
      • Overview of result sets
      • Limits
      • FetchSize
      • refreshRow
      • useCursorFetch
    • Batch processing
    • Failover and Load-Balancing
      • Failover and load balancing modes
      • LoadBalance strategies
      • LoadBalance strategies configuration methods
    • Security features
    • SQL NetworkCostInfo
    • Troubleshooting
  • Reference
    • Features specific to the Oracle mode
      • Binary Protocol (Prepared Statements)
        • COM_STMT_PREPARE_EXECUTE
        • COM_STMT_SEND_PIECE_DATA
      • Call PL stored procedures
      • Result set performance
      • Use ARRAY and STRUCT classes
      • Distributed transactions
        • Overview of distributed transactions
        • XA components
        • Distributed transaction examples
      • Error messages in Oracle mode
      • Get remarks
      • Data types supported in Oracle mode
    • Supported SQL and PL data types
    • Common APIs
      • Overview of common APIs
      • java.sql.Connection
      • java.sql.CallableStatement
      • java.sql.DatabaseMetaData
      • java.sql.Driver
      • java.sql.PreparedStatement
      • java.sql.ParameterMetaData
      • java.sql.ResultSet
      • java.sql.ResultSetMetaData
      • java.sql.Statement
      • javax.sql.ConnectionPoolDataSource
      • javax.naming.Context
      • javax.sql.PooledConnection
  • Release Notes
    • V2.4
      • OceanBase Connector/J V2.4.2
      • OceanBase Connector/J V2.4.1
      • OceanBase Connector/J V2.4.0
    • V2.2
      • OceanBase Connector/J V2.2.11
      • OceanBase Connector/J V2.2.10
      • OceanBase Connector/J V2.2.7
      • OceanBase Connector/J V2.2.6
      • OceanBase Connector/J V2.2.3
      • OceanBase Connector/J V2.2.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Connector/J
  3. V2.4.2

OceanBase Connector/J V2.4.2

Last Updated:2026-09-04 08:24:25

Version information
Overview
Feature enhancements
Bug fixes

Version information

  • Release date: February 09, 2023

  • Version number: V2.4.2

Overview

OceanBase Connector/J V2.4.2 is released to improve load balancing capabilities by retrieving ODP configuration information from OCP. It also fixes compatibility issues and defects related to the OB2.0 protocol. This version is recommended for regular business use.

Feature enhancements

  • Added a method to retrieve ODP configuration information from OCP, enhancing load balancing capabilities. The following URL parameters are added:
Option
Meaning
Default Value
ocpAccessInterval Interval for Accessing OCP (minutes) 5
httpConnectTimeout Sets the specified timeout value (in milliseconds) to be used when opening a communication link to a resource referenced by this URLConnection. 0 (Infinity)
httpReadTimeout When a URLConnection is established to a resource, a non-zero value specifies the timeout period (in milliseconds) for reading from the input stream. 0 (Infinity)

Bug fixes

  • Fixed an issue where the behavior of the getImportedKeys interface was incompatible with MySQL in MySQL-compatible mode.
  • Fixed an issue where the export behavior was incompatible with MySQL when a DATATIME type field was set to "0000-00-00 00:00:00" in MySQL-compatible mode.
  • Fixed an issue where using the binary protocol in Oracle-compatible mode caused an error when getting a FLOAT value using getDouble.
  • Fixed an issue where an error occurred in the driver because the internal SQL statement of the getBestRowIdentifier interface did not include ORDER BY.
  • Fixed an issue where the load balancing strategy within a URL extension Option configuration group did not take effect.
  • Fixed an issue where arrays containing BLOB were not supported in Oracle-compatible mode.
  • Fixed an issue where interfaces such as SELECT ' ' and getShort() returned errors in MySQL-compatible mode, which were inconsistent with the native driver.
  • Fixed an issue where the return value of the ResultSetMetaData.getColumnName() interface was inconsistent with the native driver in MySQL-compatible mode.
  • Fixed an issue where inserting rows using a composite index succeeded but a SELECT statement returned an error in MySQL-compatible mode.
  • Fixed an issue where, after closing a result set, the behavior of getMetaData() was inconsistent with the native driver in MySQL/Oracle compatible modes.
  • Fixed an issue where, after closing a result set, the behavior of getInt() was inconsistent with the native driver in MySQL/Oracle compatible modes.
  • Fixed an issue where the return value of the ParameterMetaData interface was inconsistent with the native driver in MySQL-compatible mode.
  • Fixed an issue where passing the client IP through was caused by getLocalAddress returning '0.0.0.0' in the rich client.

Previous topic

javax.sql.PooledConnection
Last

Next topic

OceanBase Connector/J V2.4.1
Next
on this page
Version information
Overview
Feature enhancements
Bug fixes