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.18
  • What is OceanBase Connector J?
    • Overview of OceanBase Connector/J
    • Compatibility requirements
  • Install Driver
    • Install and load OceanBase Connector/J
  • Instructions
    • Quick start
      • Import packages
      • Establish 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
      • Examples
    • Data sources and URL
      • Data source overview
      • Database URL
      • clientInfoProvider
    • 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 interface
      • CHAR, VARCHAR, and RAW data types
    • Statement caching
      • Overview of statement caching
      • Use statement caching
      • Reuse statement objects
    • Call a stored procedure
    • Handle SQL exceptions
    • Result set
      • Overview of result sets
      • Limitations
      • FetchSize
      • refreshRow
      • useCursorFetch
    • Batch processing
    • Failover and Load-Balancing
      • Failover and load balancing modes
      • LoadBalance strategies
      • Load balancing strategy configuration methods
      • Replication mode
    • Rich client
    • Logging
    • Network overheads
    • Show Trace
    • Security features
    • 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
      • Scrollability of a result set
      • Use ARRAY and STRUCT classes
      • Distributed transactions
        • Overview
        • XA components
        • Distributed transaction examples
      • Obtain remarks
      • Data types supported in Oracle mode
      • Error messages in Oracle mode
    • Supported SQL and PL data types
    • Common APIs
      • Overview
      • 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
      • com.oceanbase.jdbc.ObPrepareStatement
    • Behavior differences between JDBC strict compatibility mode and non-strict compatibility mode
  • Release Notes
    • V2.4
      • OceanBase Connector/J V2.4.18
      • OceanBase Connector/J V2.4.17
      • OceanBase Connector/J V2.4.16
      • OceanBase Connector/J V2.4.15
      • OceanBase Connector/J V2.4.14
      • OceanBase Connector/J V2.4.13
      • OceanBase Connector/J V2.4.12
      • OceanBase Connector/J V2.4.11
      • OceanBase Connector/J V2.4.8
      • OceanBase Connector/J V2.4.5
      • OceanBase Connector/J V2.4.4
      • OceanBase Connector/J V2.4.3
      • 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.18

OceanBase Connector/J V2.4.17

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

Overview
New features
Compatibility changes
Product behavior changes
URL parameter changes
Bug fixes

Release date: February 2, 2026 Version: V2.4.17

Overview

JDBC V2.4.17 introduces the clientInfoProvider attribute, supporting custom implementations of the Connection.get/setClientInfo() interface. In MySQL mode, it now supports the Array data type. In Oracle tenants, it is compatible with the DatabaseMetaData interface, enhancing overall compatibility with both MySQL and Oracle.

New features

  • Supports the clientInfoProvider connection attribute for custom implementations of the Connection.get/setClientInfo() interface, applicable to both MySQL and Oracle tenants.
  • In MySQL tenants, supports the Array data type, including 7 types: tinyint, smallint, int, bigint, float, double, and varchar.
  • In Oracle tenants, is compatible with the DatabaseMetaData interface, including supportsCatalogsInDataManipulation() and supportsSchemasInDataManipulation().

Compatibility changes

Product behavior changes

The following behavior changes are introduced:

Feature
Affects Tenant
Behavior After Change
Behavior Before Change
DatabaseMetaData interface return values Oracle metaData.supportsCatalogsInDataManipulation() = false, metaData.supportsSchemasInDataManipulation() = true metaData.supportsCatalogsInDataManipulation() = true, metaData.supportsSchemasInDataManipulation() = false
useSqlStringCache URL parameter behavior Oracle, MySQL The parameter is deprecated and no longer effective; when set to true, an error is returned, and it must be changed to false The parameter is supported; when set to true, the parameter is effective; when set to false, the feature is ineffective
useLegacyDatetimeCode default value modification MySQL Default value is true, meaning that the JVM's default timezone is used for time processing in JDBC. For versions below 2.4.15, the default value is true; for versions 2.4.15 and 2.4.16, the default value is false; for 2.4.17 and later, the default value is fixed to true Default value is false, meaning that the timezone set in the URL is used for time processing in JDBC
loadbalance blacklist timeout setting Oracle, MySQL The timeout parameter for the blacklist is in milliseconds The timeout for the blacklist is in seconds
clob.toString method output content Oracle, MySQL Added parameter obClobToStringReturnsContents to control the output of clob.toString. false: compatible with mysql-jdbc and oracle-jdbc, output className@hash code (default); true: output clob content. For versions below 2.4.14, clob.toString outputs clob content; for 2.4.14–2.4.16, the output is className@hash code -
number, decimal, float data type values less than 10^-6 getString output format Oracle, MySQL Oracle tenants: getString always uses standard notation, not scientific notation. MySQL tenants using text protocol: always use standard notation. MySQL tenants using PS protocol: use scientific notation for values less than 10^(-6) For number, decimal, and float values less than 10^-6, return the number in scientific notation

URL parameter changes

The following URL parameters are changed:

Name
Change
Description
clientInfoProvider New The class name implementing the com.oceanbase.jdbc.ClientInfoProvider interface, used to support custom management and retrieval of Connection.get/setClientInfo() methods.
sendTypesToServer New Forces sending data types to the OBServer in PS/Unified protocol scenarios. Default value is true.
useLegacyDatetimeCode Default value changed Default value changed from false to true; when set to true, the JVM's default timezone is used for time processing in JDBC.
obClobToStringReturnsContents New Controls whether Clob.toString() returns CLOB content (instead of the class name). Default value is false.

Bug fixes

The following issues were fixed in this release:

  • Fixed an issue where, in Oracle tenants, using array binding with large data volumes caused packet splitting and improper handling of empty bitmaps, leading to OBServer core dumps.
  • Fixed an issue where, in send piece + reused stmtid scenarios, new-params-bound-flag=false and ODP switching OBServer connections, JDBC did not send parameter information, causing parameter type retrieval errors on the new OBServer node.
  • Fixed an issue where, with ps cache enabled and using cursor result sets, the Statement object did not truly close the cursor when executing executeQuery, leading to cursor limits.
  • Fixed an issue where, with ps cache enabled, SQL statements longer than prepStmtCacheSqlLimit could not be cached or properly closed, leading to cursor limits.
  • Fixed an issue where, using the PS protocol, repeated field traversal in large result sets or with many fields impacted performance.
  • Fixed an issue where, using the getXaConnection(user, password) interface and configuring the URL via extended information, a null pointer exception occurred.
  • Fixed an issue where, with multi-statement SQL exceeding length limits, JDBC repeatedly parsed SQL statements, increasing processing time.
  • Fixed an issue where, in Oracle mode using the Unified protocol and with PS cursor enabled, ArrayBinding batch operations did not reuse PS IDs, leading to cursor limits.
  • Fixed an issue where, with JDBC defaulting to UTF8 character encoding for OBServer exceptions, non-UTF8 encoded exception information from OBServer caused garbled text.
  • Fixed an issue where, with the useSqlStringCache parameter enabled, the getCachedSql method occasionally returned errors.
  • Fixed an issue where, in PL calls with parameter lists containing expressions, JDBC mishandled parameters, causing index out-of-bounds and call errors.

Previous topic

OceanBase Connector/J V2.4.18
Last

Next topic

OceanBase Connector/J V2.4.16
Next
on this page
Overview
New features
Compatibility changes
Product behavior changes
URL parameter changes
Bug fixes