I am a fresher to Nhibernate.
I am getting the following exception while running my project:
Code:
NHibernate.HibernateException was unhandled by user code
Message=Creating a proxy instance failed
Source=NHibernate
StackTrace:
at NHibernate.Proxy.CastleProxyFactory.GetProxy(Object id, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.CreateProxy(Object id, ISessionImplementor session)
at NHibernate.Impl.SessionImpl.DoLoadByClass(Type clazz, Object id, Boolean checkDeleted, Boolean allowProxyCreation)
at NHibernate.Impl.SessionImpl.InternalLoad(Type clazz, Object id, Boolean eager, Boolean isNullable)
at NHibernate.Type.EntityType.ResolveIdentifier(Object id, ISessionImplementor session)
at NHibernate.Type.EntityType.ResolveIdentifier(Object id, ISessionImplementor session, Object owner)
at NHibernate.Impl.SessionImpl.InitializeEntity(Object obj)
at NHibernate.Loader.Loader.InitializeEntitiesAndCollections(IList hydratedObjects, Object resultSetId, ISessionImplementor session)
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.DoList(ISessionImplementor session, QueryParameters queryParameters)
at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters)
at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
at NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session)
at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria, IList results)
at NHibernate.Impl.SessionImpl.Find[T](CriteriaImpl criteria)
at NHibernate.Impl.CriteriaImpl.List[T]()
at com.CoureTech.bpm.dao.MiscDAO.GetConfiguration() in C:\Users\Isola Olufemi\Documents\COURE PROJS\Code To CoureTech20110912\BPM\BPMDAO\MiscDAO.cs:line 402
at com.CoureTech.bpm.bo.MiscBO.GetConfiguration() in C:\Users\Isola Olufemi\Documents\COURE PROJS\Code To CoureTech20110912\BPM\BPMBO\MiscBO.cs:line 57
at BPMCache.LoadFirmConfiguration() in c:\Users\Isola Olufemi\Documents\COURE PROJS\Code To CoureTech20110912\BPM\BPMUI\App_Code\BPMCache.cs:line 46
at ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\Users\Isola Olufemi\Documents\COURE PROJS\Code To CoureTech20110912\BPM\BPMUI\Global.asax:line 8
InnerException: System.Reflection.AmbiguousMatchException
Message=Ambiguous match found.
Source=mscorlib
StackTrace:
at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers)
at System.Type.GetMethod(String name)
at Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.LockBlockExpression.Emit(IEasyMember member, ILGenerator gen)
at Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.ExpressionStatement.Emit(IEasyMember member, ILGenerator gen)
at Castle.DynamicProxy.Builder.CodeBuilder.AbstractCodeBuilder.Generate(IEasyMember member, ILGenerator il)
at Castle.DynamicProxy.Builder.CodeBuilder.EasyMethod.Generate()
at Castle.DynamicProxy.Builder.CodeBuilder.AbstractEasyType.EnsureBuildersAreInAValidState()
at Castle.DynamicProxy.Builder.CodeBuilder.AbstractEasyType.BuildType()
at Castle.DynamicProxy.Builder.CodeGenerators.BaseCodeGenerator.CreateType()
at Castle.DynamicProxy.Builder.CodeGenerators.ClassProxyGenerator.GenerateCode(Type baseClass, Type[] interfaces)
at Castle.DynamicProxy.Builder.DefaultProxyBuilder.CreateClassProxy(Type theClass, Type[] interfaces)
at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type baseClass, Type[] interfaces, IInterceptor interceptor, Boolean checkAbstract, Object[] argumentsForConstructor)
at NHibernate.Proxy.CastleProxyFactory.GetProxy(Object id, ISessionImplementor session)
InnerException:
Can any one help me with this or throw some light on the issue
Warm Regards to all.