My Oracle Support Banner

JDBC Error: Java.nio.BufferUnderflowException: Null When Using 12.2 JDBC Driver With Patch 29286176 (Doc ID 2606533.1)

Last updated on OCTOBER 31, 2022

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


Tomcat application using JDBC fails with java.nio.BufferUnderflowException: null exception.
<Patch 29286176> has been applied.

This happens almost as soon as the Application comes up.
Also, this error only happens in production environment; it does not reproduce anywhere else.
Production environment is data guarded to a DR site. Even bringing DR dataguard database up does not reproduce the error.

Exception stack:

Caused by: java.nio.BufferUnderflowException: null
at java.nio.Buffer.nextGetIndex(
at java.nio.HeapByteBuffer.get(
at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(
at oracle.jdbc.driver.T4CTTIfun.receive(
at oracle.jdbc.driver.T4CTTIfun.doRPC(
at oracle.jdbc.driver.T4C8Oall.doOALL(
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.