Exception: An item with the same key has already been added
Posted: Mon 08 Mar 2010 11:52
We are still experiencing one indeterminate exception which occurs randomly with all kind of queries.
Here is a stacktrace:
We use data context for atomic queries. Here is an example of the query which throws described exception:
Unfortunately, I can't reproduce this problem. I only see a lot of these exceptions in our log file.
Can you advice any suggestion to fix this issue? (We are using the latest Mysql dotConnect beta version 5.70.102)
Thank you.
Here is a stacktrace:
Code: Select all
MESSAGE: An item with the same key has already been added.
STACKTRACE: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Devart.Data.Linq.CompiledQueryCache.a(a A_0, CompiledQuery A_1)
at Devart.Data.Linq.Provider.DataProvider.a(Expression A_0)
at Devart.Data.Linq.Provider.DataProvider.h(Expression A_0)
at Devart.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
at System.Linq.Queryable.Single[TSource](IQueryable`1 source)
at ...
Code: Select all
using (DBContext DB = new DBContext())
{
return DB.Users.Where(u => u.Id == id).Single();
}
Unfortunately, I can't reproduce this problem. I only see a lot of these exceptions in our log file.
Can you advice any suggestion to fix this issue? (We are using the latest Mysql dotConnect beta version 5.70.102)
Thank you.