View Full Version : After migration to new NHibernate version 1.2.0alpha
Aleksei Kachanov
08-08-2006, 01:06 PM
Exception occured if we call
Type proxyType = typeBuilder.CreateType();
in Spring.Aop.Framework.DynamicProxy.CompositionProxy Builder
Signature of the body and declaration in a method implementation do not match. Type: 'Spring.Aop.DynamicProxy.Proxy_1ce2ebd366094bbc83e ac0220665567c'. Assembly: 'Spring.Aop.DynamicProxy, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Bruno Baia
08-09-2006, 01:04 PM
Hi Aleksei,
Can you try to get the type being proxied and interfaces it implements ?
(Add watch 'advised.TargetSource.TargetType')
It's maybe due to a method using ref/out paremeters or to a generic method.
-Bruno
Aleksei Kachanov
08-09-2006, 02:11 PM
It's bug is fully related to this issue http://forum.springframework.net/showthread.php?t=644
ISession and ISessionImplementor interfaces from NHibernate contains next method declarations
IList<T> Filter<T>( object collection, string filter, QueryParameters parameters );
IEnumerable<T> EnumerableFilter<T>( object collection, string filter, QueryParameters parameters );
T Get<T>( object id );
T Load<T>(object id, LockMode lockMode);
I hope this bug will be fixed as soon as "DynamicProxy doesn't support generic method declarations?" issue
Thanks, Bruno
Bruno Baia
08-11-2006, 01:14 AM
Hi Aleksei,
I commited the fix for "DynamicProxy doesn't support generic method declarations".
Try the latest nightly build to see if it works now.
-Bruno
Bruno Baia
09-04-2006, 12:16 PM
Hi Aleksei,
Any feedback from the migration to NHibernate 1.2alpha ?
-Bruno
Aleksei Kachanov
09-05-2006, 09:20 AM
After previous exception we stopped migration
I just integrate it and run some times. But didn't test and use.
At first look it works fine.
Thanks a lot.
I hope in the future we continue this integration.
nokiola
09-05-2006, 03:05 PM
I am using the latest NHibernate and the nightly build for Spring.Data.NHibernate with the file Spring.Data.NHibernate-20060824-1413.zip
When I try to call HibernateTemplate.Execute returning a generic IList, I received the following exception:
System.TypeLoadException: Signature of the body and declaration in a method implementation do not match. Type: 'Spring.Aop.DynamicProxy.Proxy_14e5932a031b4c9e8f5 32445c8ef9df5'. Assembly: 'Spring.Aop.DynamicProxy, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at Spring.Data.Orm.NHibernate.HibernateTemplate.Execu te(IHibernateCallback action, Boolean exposeNativeSession)
at Spring.Data.Orm.NHibernate.HibernateTemplate.Execu te(IHibernateCallback action)
at MindLogix.DataAccess.Impl.GenericDAO`2.GetAll() in GenericDAO.cs:line 26
at Services.Impl.AccountServices.GetAll() in AccountServices.cs:line 49
at Spring.Transaction.Interceptor.TransactionIntercep tor.Invoke(IMethodInvocation invocation)
at Spring.Aop.Framework.AbstractMethodInvocation.Proc eed()
at Aspects.Logging.Log4NetLoggingAroundAdvice.Invoke( IMethodInvocation invocation) in Log4NetLoggingAroundAdvice.cs:line 39
at Spring.Aop.Framework.AbstractMethodInvocation.Proc eed()
at Spring.Aop.Framework.DynamicProxy.BaseCompositionP roxy.Invoke(Object target, Type targetType, MethodInfo method, Object[] args, IList interceptors)
at Spring.Aop.DynamicProxy.Proxy_ef9a1796c2d24f27a725 63a691924b1b.GetAll()
at Framework.UnitTests.Test1.AThirdExampleTest() in Test1.cs:line 83
As far I understood from your posts, this should've been fixed. Should this happen again or there is something else?
Regards,
Robert
Bruno Baia
09-05-2006, 03:26 PM
Hi Robert,
the proxy type name generated ("Spring.Aop.DynamicProxy.Proxy_14e5932a031b4c9e8f5 32445c8ef9df5'") tells me that you are not using fixed binaries (Spring.Aop & Spring.Core).
I updated (http://fisheye1.cenqua.com/changelog/springnet/?cs=MAIN:bbaia:20060810211513) the common libraries in NHibernate integration project after the fix.
Try with recent bins, and let me now,
Bruno
nokiola
09-05-2006, 03:48 PM
Thank you, works like a charm.
R.
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.