-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Castle Proxy Issue
PostPosted: Tue Sep 13, 2011 7:47 am 
Newbie

Joined: Tue Sep 13, 2011 7:40 am
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.