-->
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.  [ 4 posts ] 
Author Message
 Post subject: Proxy MissingMethodException with NHibernate 1.0.2
PostPosted: Mon Jan 16, 2006 1:13 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
I just recompiled my application with NHibernate 1.0.2. Now, I cannot execute queries. I get this exception:

Code:
ADOException: Could not execute query
MissingMethodException: Method not found: 'System.Object Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(System.Type, System.Type[], Castle.DynamicProxy.IInterceptor, Boolean, System.Object[])'.
   at NHibernate.Proxy.CastleProxyFactory.GetProxy(Object id, ISessionImplementor session)
   at NHibernate.Persister.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)
   at NHibernate.Type.ManyToOneType.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, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
   at NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)
   at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)
   at NHibernate.Impl.QueryImpl.List()


Debugging through Visual Studio, the object browser clearly shows that Castle.DynamicProxy.dll is loaded and that the method is defined.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 1:36 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
NH 1.0.2 uses an updated version of DynamicProxy. And the Castle guys apparently updated it again without changing the version number.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 3:20 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
Thanks, I'll try it again, making sure that Castle.DynamicProxy.dll has the same file date as the one included with NHibernate 1.0.2 ...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 3:47 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
I had an older copy (same version number, unfortunately) of Castle.DynamicProxy in the GAC. I removed that, rebuilt my application, now everything works fine.


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

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.