NHibernate 2.1 MsSql2000Dialect error

Posted by Daniel Dolz on Stack Overflow See other posts from Stack Overflow or by Daniel Dolz
Published on 2010-04-12T12:40:51Z Indexed on 2010/04/12 12:43 UTC
Read the original article Hit count: 510

Filed under:
|
|

Hi.

I had an old (but great) app using NHibernate 1.0.2. Worked like a charm. But then I decided to upgrade to NHibernate 2.1.2. Had to change some stuff, worked great also.

Problem is, I founded out that new version works in some machines and do not work in others. What the heck? Thinking a while, I discovered that it only works in pcs with SQL 2000 installed!! previous version used to works everywhere.... Check out a piece of my exception, it has to do with mssql2000Dialect

NHibernate.MappingException: Could not compile the mapping document: Datos.NH_VEN_ComprobanteBF.hbm.xml ---> NHibernate.HibernateException: Could not instantiate dialect class NHibernate.Dialect.MsSql2000Dialect ---> System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.TypeInitializationException: Se produjo una excepción en el inicializador de tipo de 'NHibernate.NHibernateUtil'. ---> System.TypeLoadException: No se puede cargar el tipo 'System.DateTimeOffset' del ensamblado'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
   en NHibernate.Type.DateTimeOffsetType.get_ReturnedClass()
   en NHibernate.NHibernateUtil..cctor()
   --- Fin del seguimiento de la pila de la excepción interna ---
   en NHibernate.Dialect.Dialect..ctor()
   en NHibernate.Dialect.MsSql2000Dialect..ctor()
   --- Fin del seguimiento de la pila de la excepción interna ---
   en System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   en System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)

Could you help? Thanks!!!!

© Stack Overflow or respective owner

Related posts about .NET

Related posts about nhibernate