0

I've been getting a strange error when debugging a web app using oracle query notification and ODP.Net

The exception I'm getting is:

Item has already been added. Key in dictionary: '4118'  Key being added: '4118'

The call stack is as follow:

Oracle.ManagedDataAccess.dll!OracleInternal.ServiceObjects.NotificationBufferManager.PutNotificationOraBufPool(OracleInternal.Network.OracleCommunication orclCommunication)
Oracle.ManagedDataAccess.dll!OracleInternal.ServiceObjects.NotificationHandler.ProcessBufferedNSDataPackets()
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()
[Native to Managed Transition]

Does anyone have any idea what's causing this?

CWilson
  • 1
  • 1
  • Do you use the new version that was released just 3 days ago? If not, you can get it here: https://www.nuget.org/packages/Oracle.ManagedDataAccess – cremor Jun 26 '15 at 09:45
  • That does not look like an Oracle error. Did it come with an oracle error number? If not an Oracle error, you probably need to look at the code that is throwing that to understand the logic. If it is an Oracle error, please provide the whole thing including error numbers and inner exceptions as well. – Christian Shay Jun 28 '15 at 18:48

1 Answers1

0

The Error is trying to tell you exactly whats wrong... a Key is being added to a Dictionary which already contains the Key. There needs to be a check to see if a key exists first, then the value should be changed instead of trying to re add another value with the same key.

maraaaaaaaa
  • 7,749
  • 2
  • 22
  • 37
  • 1
    I'm not in control of whatever dictionary that it's being added to. The exception is being thrown outside of my code, in the course of Oracle's processing of query notifications. – CWilson Jun 24 '15 at 19:28