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.1
  • 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 information
      • 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.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.1

OceanBase Connector/J V2.2.7

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

Version information
Overview
Feature enhancements
Bug fixes

Version information

  • Release date: December 2, 2021
  • Version number: V2.2.7

Overview

OceanBase Connector/J V2.2.7 is released to fully support the PREPARE_EXECUTE protocol and its SEND PIECE feature, addressing customer issues. It is ready for routine business use.

Feature enhancements

  • SEND PIECE is disabled by default in Oracle-compatible mode. To enable it, set useServerPrepStmts=true&usePieceData=true.
  • COM_STMT_PREPARE_EXECUTE supports batch operations in Oracle-compatible mode.
  • The performance of PreparedStatement.setBytes has been optimized in Oracle-compatible mode, reducing the time consumed for 32K data from 60ms to 15ms.
  • Adjusted the limit for Statement FetchSize.
  • Adjusted the conditions for using useCursorFetch to read result sets.
  • Stream reading is no longer supported in Oracle-compatible mode, consistent with native Oracle behavior.
  • Placeholders in name format are automatically converted to ? format when not used in Procedures or Functions.
  • Modified the default value of cachePrepStmts to false, aligning it with MySQL JDBC.

Bug fixes

  • Fixed the issue where querying Oracle RAW type data via stmt.setBinaryStream returned incomplete data.
  • Fixed the error when using setClob with EmptyCLOB() in Oracle-compatible mode.
  • Fixed the error when Localdatetime was passed as a timestamp.
  • Fixed the field mapping error when using column aliases in a MyBatis environment.
  • Fixed the type judgment error after calling getObject() when Clob and Blob are in an inheritance relationship.
  • Fixed the error when using SEND PIECE to connect to ODP.
  • Fixed the error when specifying the Clob column's class as String in getObject().
  • Fixed the error when setting usePipelineAuth=true.
  • Fixed the error for the rewriteBatch parameter.
  • Fixed the issue where setPort did not take effect in OceanBaseDataSource.
  • Fixed the issue where uploading failed due to single quotes in a Clob column.
  • Fixed the issue where hints were treated as comments and removed in Oracle-compatible mode.

Previous topic

OceanBase Connector/J V2.2.10
Last

Next topic

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