Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# big_al 3/29/2006 9:24 PM
Hi Guys

I am getting an odd error when I move the Admin section in to a new assembly / project.
could not interpret type: Nullables.NHibernate.NullableDateTimeType, Nullables.NHibernate 
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: NHibernate.MappingException: could not interpret type: Nullables.NHibernate.NullableDateTimeType, Nullables.NHibernate

Source Error: 


Line 89: 		{
Line 90: 			Configuration config = new Configuration();
Line 91: 			this._nhibernateConfiguration = config.AddAssembly(this.GetType().Assembly);
Line 92: 			this._nhibernateFactory = this._nhibernateConfiguration.BuildSessionFactory();
Line 93: 		}
 

Source File: C:\Visual Studio Projects\Cuyahoga1_0_0\Core\Service\SessionFactory.cs    Line: 91 

Stack Trace: 


[MappingException: could not interpret type: Nullables.NHibernate.NullableDateTimeType, Nullables.NHibernate]
   NHibernate.Cfg.Binder.GetTypeFromXML(XmlNode node) +140
   NHibernate.Cfg.Binder.BindSimpleValue(XmlNode node, SimpleValue model, Boolean isNullable, String path, Mappings mappings) +15
   NHibernate.Cfg.Binder.PropertiesFromXML(XmlNode node, PersistentClass model, Mappings mappings) +867
   NHibernate.Cfg.Binder.BindRootClass(XmlNode node, RootClass model, Mappings mappings) +2648
   NHibernate.Cfg.Binder.BindRoot(XmlDocument doc, Mappings model) +613
   NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc) +111
   NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream) +107
   NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly, Boolean skipOrdering) +253
   NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly) +7
   Cuyahoga.Core.Service.SessionFactory.RegisterCoreClasses() in C:\Visual Studio Projects\Cuyahoga1_0_0\Core\Service\SessionFactory.cs:91
   Cuyahoga.Core.Service.SessionFactory..ctor() in C:\Visual Studio Projects\Cuyahoga1_0_0\Core\Service\SessionFactory.cs:25
   Cuyahoga.Core.Service.SessionFactory..cctor() in C:\Visual Studio Projects\Cuyahoga1_0_0\Core\Service\SessionFactory.cs:15

[TypeInitializationException: The type initializer for "Cuyahoga.Core.Service.SessionFactory" threw an exception.]
   Cuyahoga.Core.Service.SessionFactory.GetInstance() +0
   Cuyahoga.Core.Service.CoreRepository..ctor(Boolean openSession) in C:\Visual Studio Projects\Cuyahoga1_0_0\Core\Service\CoreRepository.cs:45
   Cuyahoga.Web.HttpModules.NHSessionModule.Context_BeginRequest(Object sender, EventArgs e) in C:\Visual Studio Projects\Cuyahoga1_0_0\Web\HttpModules\NHSessionModule.cs:34
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87

I have added all the mappings in web.config, except the httpmodules, as theya re already mapped in the parent app.

Any ideas?

Al
# martijnb 3/29/2006 11:42 PM
Check out the post-build steps of the original Web project. You'll see that a few assemblies are copied to the bin directory, including the Nullables.NHibernate.dll.
This post-build step is required because we need these assemblies at run-time but they are not referenced from code and thus, not deployed to the bin directory automatically.