I am going through attempting to update my code from NHibernate 1.0.2 to the 1.2.0.1 Alpha.
I've hit a snag and am unsure where exactly to look for the solution.
The code ran fine under 1.0.2 and now I get the following error.
Value cannot be null.
Parameter name: methodInfo
Code:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: methodInfo
Source Error: Code:
Line 49: /// </summary>
Line 50: //private static readonly ISessionFactory sessionFactory = configuration.Configure( HttpContext.Current.Request.MapPath(ConfigurationSettings.AppSettings["nhibernate.config"]) ).BuildSessionFactory();
Line 51: private static readonly ISessionFactory sessionFactory = configuration.Configure(HttpContext.Current.Request.MapPath( ConfigurationManager.AppSettings["nhibernate.config"])).BuildSessionFactory();
Line 52:
Line 53: /// <summary>
Source File: D:\Inetpub\ORPUDev\NHibernate.Helper\nHibernate.Helper.cs Line: 51
Stack Trace: Code:
[ArgumentNullException: Value cannot be null.
Parameter name: methodInfo]
System.Reflection.Emit.DynamicILGenerator.EmitCall(OpCode opcode, MethodInfo methodInfo, Type[] optionalParameterTypes) +1608619
NHibernate.Property.BasicSetter.Emit(ILGenerator il) in c:\net\nhibernate\nhibernate\src\NHibernate\Property\BasicSetter.cs:94
NHibernate.Bytecode.Lightweight.ReflectionOptimizer.GenerateSetPropertyValuesMethod(IGetter[] getters, ISetter[] setters) in c:\net\nhibernate\nhibernate\src\NHibernate\Bytecode\Lightweight\ReflectionOptimizer.cs:212
NHibernate.Bytecode.Lightweight.ReflectionOptimizer..ctor(Type mappedType, IGetter[] getters, ISetter[] setters) in c:\net\nhibernate\nhibernate\src\NHibernate\Bytecode\Lightweight\ReflectionOptimizer.cs:47
NHibernate.Bytecode.Lightweight.BytecodeProviderImpl.GetReflectionOptimizer(Type mappedClass, IGetter[] getters, ISetter[] setters) in c:\net\nhibernate\nhibernate\src\NHibernate\Bytecode\Lightweight\BytecodeProviderImpl.cs:40
NHibernate.Persister.Entity.AbstractEntityPersister..ctor(PersistentClass persistentClass, ISessionFactoryImplementor factory) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:820
NHibernate.Persister.Entity.SingleTableEntityPersister..ctor(PersistentClass model, ISessionFactoryImplementor factory, IMapping mapping) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\SingleTableEntityPersister.cs:771
NHibernate.Persister.PersisterFactory.CreateClassPersister(PersistentClass model, ISessionFactoryImplementor factory, IMapping cfg) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\PersisterFactory.cs:51
NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionFactoryImpl.cs:169
NHibernate.Cfg.Configuration.BuildSessionFactory() in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:1007
NHibernate.Helper.Db..cctor() in D:\Inetpub\ORPUDev\NHibernate.Helper\nHibernate.Helper.cs:51
[TypeInitializationException: The type initializer for 'NHibernate.Helper.Db' threw an exception.]
NHibernate.Helper.Db.CloseSession() in D:\Inetpub\ORPUDev\NHibernate.Helper\nHibernate.Helper.cs:122
NHibernate.Helper.Module.EndRequest(Object sender, EventArgs e) in D:\Inetpub\ORPUDev\NHibernate.Helper\HttpModules\NHibernateSessionModule.cs:20
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64