My Oracle Support Banner

Exception in thread main "java.lang.OutOfMemoryError: Java heap space" Due to T4CStatement Objects (Doc ID 1073503.1)

Last updated on MAY 25, 2023

Applies to:

JDBC - Version 10.2.0.4 to 11.1.0.7 [Release 10.2 to 11.1]
Information in this document applies to any platform.

Symptoms

An application fails with java.lang.OutOfMemoryError when it reuses the JDBC Callable Statement.
Memory heap analysis shows that objects of oracle.jdbc.driver.T2CCallableStatement occupy JVM space.

Error :

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
 at oracle.jdbc.driver.OracleSql.<init>(OracleSql.java:77)
 at oracle.jdbc.driver.OracleStatement.<init> (OracleStatement.java:743)
 at oracle.jdbc.driver.T4CStatement.<init>(T4CStatement.java:1185)
 at oracle.jdbc.driver.T4CConnection.RefCursorBytesToStatement (T4CConnection.java:739)
 at oracle.jdbc.driver.T4CResultSetAccessor.unmarshalOneRowTT4CResultSetAccessor.java:188)
 at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:895)
 at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:820)
 at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:713)
 at oracle.jdbc.driver.T4CCallableStatement.doOall8 (T4CCallableStatement.java:191)
 at oracle.jdbc.driver.T4CCallableStatement.executeForRows (T4CCallableStatement.java:944)
 at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout (OracleStatement.java:1222)
 at oracle.jdbc.driver.OraclePreparedStatement.executeInternal (OraclePreparedStatement.java:3381)
 at oracle.jdbc.driver.OraclePreparedStatement.executeQuery (OraclePreparedStatement.java:3425)
 at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1202)
 at MemoryLeak.main(MemoryLeak.java:33)




Changes

 

Cause

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
Symptoms
Changes
Cause
Solution
References


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