1. Make sure your system is running .NET 2.0 SP1 or higher. If you are running anything below 2.0 SP1 you won't find DateTimeOffset.
2. Double check the dialect is running with the same release package as NH 2.1.2. IE: Maybe you have stale references lingering around in GAC or some other bin directory. -Brian On Aug 1, 8:08 am, PLen <[email protected]> wrote: > Hello, > > I have recently had to move back to use the NHibernate 2.1.2 API > because our client's network does not support .NET 3.5 (which is what > the NHibernate 3.0 supports). So, I am now using the 2.1.2 APIs but > when I tried to run my application I got the following error > concerning not being able to compile a mapping file: > > Could not instantiate dialect class > NHibernate.Dialect.Oracle10gDialect ---> > System.Reflection.TargetInvocationException: Exception has been thrown > by the target of the invocation. ---> > System.TypeInitializationException: The type initializer for > 'NHibernate.NHibernateUtil' threw an exception. ---> > System.TypeLoadException: Could not load type 'System.DateTimeOffset' > from assembly....... > > My domain classes contain System.DateTime objects which refer to > Oracle DATE columns. I have tried using both a 10g and 11g Oracle > client but both fail. The mapping file that the error lists does not > have a date column reference itself, so it must be that it was the > first mapping file in the chain. If I remove that mapping file and > references in the application code, I simply get the same error for > another mapping file. > > Does anyone know what may be happing here? Usually, when I get > mapping compile errors, I have a syntax error or something, but in > this case, the mapping files themselves do not list any datatypes. Not > sure if I need to use a different datatype in my domain class or if > there is something in the environment that could be causing the > problem. > > Any clues?? > > Thanks - Peter -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
