Hi!

Guys, we are getting the following error on the production site. It
happens sometimes and it is completely unclear how to reproduce this.
>From one hand it looks like a bug in LinFu proxy provider, but it
always happend in the same piece of our code. So it is possible our
misuse. Perhaps, some threading issue.

NHibernate.HibernateException: Creating a proxy instance failed --->
System.IndexOutOfRangeException: Index was outside the bounds of the
array.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue
value, Boolean add)
   at System.Collections.Generic.Dictionary`2.set_Item(TKey key,
TValue value)
   at LinFu.DynamicProxy.ProxyCache.StoreProxyType(Type result, Type
baseType, Type[] baseInterfaces)
   at LinFu.DynamicProxy.ProxyFactory.CreateProxyType(Type baseType,
Type[] baseInterfaces)
   at LinFu.DynamicProxy.ProxyFactory.CreateProxy(Type instanceType,
IInterceptor interceptor, Type[] baseInterfaces)
   at NHibernate.ByteCode.LinFu.ProxyFactory.GetProxy(Object id,
ISessionImplementor session)
   --- End of inner exception stack trace ---
   at NHibernate.ByteCode.LinFu.ProxyFactory.GetProxy(Object id,
ISessionImplementor session)
   at
NHibernate.Tuple.Entity.AbstractEntityTuplizer.CreateProxy(Object id,
ISessionImplementor session)
   at
NHibernate.Persister.Entity.AbstractEntityPersister.CreateProxy(Object
id, ISessionImplementor session)
   at
NHibernate.Event.Default.DefaultLoadEventListener.CreateProxyIfNecessary(LoadEvent
event, IEntityPersister persister, EntityKey keyToLoad, LoadType
options, IPersistenceContext persistenceContext)
   at
NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent
event, IEntityPersister persister, EntityKey keyToLoad, LoadType
options)
   at
NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent
event, LoadType loadType)
   at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType
loadType)
   at NHibernate.Impl.SessionImpl.InternalLoad(String entityName,
Object id, Boolean eager, Boolean isNullable)
   at NHibernate.Type.EntityType.ResolveIdentifier(Object id,
ISessionImplementor session)
   at NHibernate.Engine.TwoPhaseLoad.InitializeEntity(Object entity,
Boolean readOnly, ISessionImplementor session, PreLoadEvent
preLoadEvent, PostLoadEvent postLoadEvent)
   at NHibernate.Loader.Loader.InitializeEntitiesAndCollections(IList
hydratedObjects, Object resultSetId, ISessionImplementor session,
Boolean readOnly)
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session,
QueryParameters queryParameters, Boolean returnProxies)
   at
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor
session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session,
Object id, IType identifierType, Object optionalObject, String
optionalEntityName, Object optionalIdentifier, IEntityPersister
persister)
   at
NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor
session, Object id, Object optionalObject, Object optionalId)
   at NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id,
Object optionalObject, ISessionImplementor session)
   at NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object
id, Object optionalObject, LockMode lockMode, ISessionImplementor
session)
   at
NHibernate.Event.Default.DefaultLoadEventListener.LoadFromDatasource(LoadEvent
event, IEntityPersister persister, EntityKey keyToLoad, LoadType
options)
   at NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent
event, IEntityPersister persister, EntityKey keyToLoad, LoadType
options)
   at
NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent
event, LoadType loadType)
   at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType
loadType)
   at NHibernate.Impl.SessionImpl.ImmediateLoad(String entityName,
Object id)
   at NHibernate.Proxy.AbstractLazyInitializer.Initialize()
   at NHibernate.Proxy.AbstractLazyInitializer.GetImplementation()
   at
NHibernate.ByteCode.LinFu.LazyInitializer.Intercept(InvocationInfo
info)
   at SdfFileProxy.get_Name()
   at sdf.Persist.SdfFile.FileCacheEntry.CacheChildren(IList
relations, Hashtable children, ListDictionary links, ArrayList
overlays)
   at sdf.Persist.SdfFile.AddCacheEntry()
   at sdf.Persist.SdfFile.AnalyzeFilePath(ISession s, String path,
SdfFile& current, String[]& pathTail)
   at sdf.SdfContext.PrepareSdfRequest(Uri url)
   at sdf.SdfApplication.BeginRequestHandler(Object sender, EventArgs
e)
   at
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)

Does anybody have ideas?

Best,
Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to