OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Connector/J

V2.4.17

  • 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
    • 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
  • Release Notes
    • V2.4
      • 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

Overview of OceanBase Connector/J Compatibility requirements Install and load OceanBase Connector/J 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 source overview Database URLclientInfoProvider Overview of Java data streams LONG and LONG RAW data types CHAR, VARCHAR, and RAW data types Overview of statement caching Use statement caching Reuse statement objects Call a stored procedure Handle SQL exceptions Overview of result sets Limitations FetchSize refreshRow useCursorFetch Batch processing Failover and load balancing modes LoadBalance strategies Load balancing strategy configuration methods Rich client Logging Network overheads Show Trace Security features Troubleshooting Call PL stored procedures Scrollability of a result set Use ARRAY and STRUCT classes Obtain remarks Data types supported in Oracle mode Error messages in Oracle mode Supported SQL and PL data types 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 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 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
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Connector/J
  3. V2.4.17
iconOceanBase Connector/J
V 2.4.17
  • V 2.4.17
  • V 2.4.16
  • V 2.4.15
  • V 2.4.14
  • V 2.4.5
  • V 2.4.4
  • V 2.4.3
  • V 2.4.2
  • V 2.4.1
  • V 2.4.0
  • V 2.2.11
  • V 2.2.10
  • V 2.2.7
  • V 2.2.6
  • V 2.2.3
  • V 2.2.0

OceanBase Connector/J V2.4.17

Last Updated:2026-04-10 07:41:43  Updated
share
What is on this page
Overview
New features
Compatibility changes
Product behavior changes
URL parameter changes
Bug fixes

folded

share

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

com.oceanbase.jdbc.ObPrepareStatement
Last

Next topic

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