My Oracle Support Banner

MANAGED ODP FAILS WITH ERROR - VALUE CANNOT BE NULL (Doc ID 1960528.1)

Last updated on MARCH 04, 2022

Applies to:

Oracle Data Provider for .NET - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

Managed ODP (OracleBlobTestApp) application fails when querying column of type BLOB with below error. Same code works fine with Un-Managed ODP provider.

Error: Value cannot be null.
Parameter name: byteArray
Stack:    at System.BitConverter.ToString(Byte[] value, Int32 startIndex,
Int32 length)
at OracleInternal.TTC.TTCLob.GetLobIdString(Byte[] lobLocator)
at OracleInternal.ServiceObjects.OracleDataReaderImpl.CollectTempLOBsToBeFreed(Int32 rowNumber)
at Oracle.ManagedDataAccess.Client.OracleDataReader.ProcessAnyTempLOBs(Int32 rowNumber)
at Oracle.ManagedDataAccess.Client.OracleDataReader.Read()
at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTabledatatable, String srcTable, DataReaderContainer dataReader, Int32
startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)

Changes

Switching the provider from un-managed ODP (Oracle.DataAccess.dll) to Managed ODP(Oracle.ManagedDataAccess.dll)

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.