I've been seeing this problem crop up since the 12g client force-upgraded the Oracle.ManagedDataAccess dll's in my GAC.
I originally posted the error on StackOverflow, thinking that it was a configuration problem on my side:
oracle - EF + ODP.NET + CLOB = Value Cannot be Null - Parameter name: byteArray? - Stack Overflow
Error:
Value cannot be null. Parameter name: byteArray
Stack Trace:
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.Entity.Core.Common.Internal.Materialization.Shaper`1.StoreRead()
However I can now confirm that this is definitely a bug in the Oracle code, as it seems to only happen under a very specific set of conditions:
Multiple Objects (Rows) are selected
Multiple Properties (Columns) are selected
AND
The data returned has a mix of null and non-null CLOB values. All null or all non-null does not seem to trigger the problem.
This is a HUGE problem for us as our applications are all written against ODP.NET, and utilize CLOBS. Has anyone else had this problem?
Any advice at this point other then 'don't use clobs' would be greatly appreciated.
Thanks