By the way I have just unmapped the Entity with nested components, now it seems to work fine even with NH2.1.2. Any suspect about the bug? I would like to keep my nested component anyway. Or where should I look in the trunk? I f possible I would like to add a failing test.
On Fri, Mar 19, 2010 at 1:52 PM, Guido <guido.zilio...@gmail.com> wrote: > I have the same problem. By the it happens just when building qgainst > NH 2.1.2 the problem is not there when building against NH 2.1.0. > Moreover configuration is ok if i remove NH.Validator setup from my > project then evrithing works ok. So I'm not really shure where the > problem stays: maybe NH.Validator and not FLuent.NH. > > If I have time I'll post a mini-project to reproduce the problem. > Below Testing output follows though not very helpful > > TestCase > > 'caps.utest._2010.progetto.FixtureProgetto.ProgettoGetBriefFunzionaConiSecondari' > failed: FluentNHibernate.Cfg.FluentConfigurationException : An invalid > or incomplete configuration was used while creating a SessionFactory. > Check PotentialReasons collection, and InnerException for more detail. > > * Database was not configured through Database method. > > ----> System.NullReferenceException : Riferimento a un oggetto non > impostato su un'istanza di oggetto. > in FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() > in FluentNHibernate.SessionSource..ctor(FluentConfiguration config) > H:\prj\obj#\!up\caps\caps-marzo-2010\caps.guywire\orm > \OrmConfigure.cs(26,0): in caps.guywire.orm.OrmConfigure.Configure() > H:\prj\obj#\!up\caps\caps-marzo-2010\caps.utest. > 2010\FixtureGuyWire_AsIs.cs(33,0): in > caps.utest._2010.FixtureGuyWire_AsIs.Before_each_test() > H:\prj\obj#\!up\caps\caps-marzo-2010\caps.utest. > 2010\FixtureGuyWire_AsIs.cs(16,0): in > caps.utest._2010.FixtureGuyWire_AsIs.SetupContext() > --NullReferenceException > in > > NHibernate.Validator.Event.ValidatePreInsertEventListener.SubElementsInspector.AddSubElement(Property > property, ValidatableElement element) > in > > NHibernate.Validator.Event.ValidatePreInsertEventListener.SubElementsInspector.AddSubElement(Property > property, ValidatableElement element) > in > > NHibernate.Validator.Event.ValidatePreInsertEventListener.SubElementsInspector.Inspect(ValidatableElement > element) > in > > NHibernate.Validator.Event.ValidatePreInsertEventListener.Initialize(Configuration > cfg) > in > NHibernate.Event.EventListeners.InitializeListeners(Configuration > cfg, Object[] list) > in NHibernate.Event.EventListeners.InitializeListeners(Configuration > cfg) > in NHibernate.Cfg.Configuration.GetInitializedEventListeners() > in NHibernate.Cfg.Configuration.BuildSessionFactory() > in FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() > > > 0 passed, 1 failed, 0 skipped, took 18,50 seconds (NUnit 2.5). > > > On Feb 12, 12:50 pm, Paul Batum <paul.ba...@gmail.com> wrote: > > I'm not sure what the problem could be. Are you on the latest build? > Nested > > components work fine for me. > > > > Are you using any ComponentConventions? If so, have you tried removing > the > > convention? > > > > On Fri, Feb 12, 2010 at 10:01 PM, Eduardo Costa <educo...@gmail.com> > wrote: > > > Yes, I remove nested component and work fine. > > > Once component work too. > > > > > On 11 fev, 08:56, Paul Batum <paul.ba...@gmail.com> wrote: > > > > The error is a null reference and the stack trace is related to > building > > > the > > > > session factory. My guess would be that the problem is related to how > > > you're > > > > setting up your configuration, rather than the nested component. Have > you > > > > tried removing the nested component to see if the error persists? > > > > > > On Tue, Feb 9, 2010 at 6:58 AM, Eduardo Costa <educo...@gmail.com> > > > wrote: > > > > > Hi, > > > > > > > I have this Map > > > > > > > Component<DadosGerais>(x => x.DadosGerais, a => > > > > > { > > > > > a.Component<FormacaoAcademicaTitulacao>(b => > > > > > b.FormacaoAcademicaTitulacao, c => > > > > > { > > > > > //Maps here > > > > > }); > > > > > }); > > > > > > > The error is: > > > > > > > ----> System.NullReferenceException : Object reference not set to > an > > > > > instance of an object. > > > > > d:\Builds\FluentNH\src\FluentNHibernate\Cfg > > > > > \FluentConfiguration.cs(98,0): em > > > > > FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() > > > > > SessionManager.cs(49,0): em > > > > > > HMV.PortalMedico.Infra.DataAccess.SessionManager.ConfigureNHibernate(IPersistenceConfigurer > > > > > databaseConfigurer, ValidatorEngine& validatorEngine, Configuration > > > > > cfg) > > > > > SessionManager.cs(102,0): em > > > > > > HMV.PortalMedico.Infra.DataAccess.SessionManager.ConfigureDataAccess(IInitializationExpression > > > > > i, IPersistenceConfigurer databaseConfigurer, Configuration& cfg) > > > > > SessionManager.cs(0,0): em > > > > > > HMV.PortalMedico.Infra.DataAccess.SessionManager.ConfigureDataAccess(IInitializationExpression > > > > > i, String connString) > > > > > SessionManager.cs(75,0): em > > > > > > HMV.PortalMedico.Infra.DataAccess.SessionManager.<>c__DisplayClass8.<ConfigureDataAccess>b__7(IInitializationExpression > > > > > i) > > > > > em StructureMap.ObjectFactory.Initialize(Action`1 action) > > > > > SessionManager.cs(75,0): em > > > > > > HMV.PortalMedico.Infra.DataAccess.SessionManager.ConfigureDataAccess(String > > > > > connString) > > > > > aaConexao_NHibernateTest.cs(14,0): em > > > > > > HMV.PortalMedico.Test.aaConexao_NHibernate.testa_conexao_com_o_nhibernate() > > > > > --NullReferenceException > > > > > em > > > > > > NHibernate.Validator.Event.ValidatePreInsertEventListener.SubElementsInspector.AddSubElement(Property > > > > > property, ValidatableElement element) > > > > > em > > > > > > NHibernate.Validator.Event.ValidatePreInsertEventListener.SubElementsInspector.AddSubElement(Property > > > > > property, ValidatableElement element) > > > > > em > > > > > > NHibernate.Validator.Event.ValidatePreInsertEventListener.SubElementsInspector.Inspect(ValidatableElement > > > > > element) > > > > > em > NHibernate.Validator.Engine.ValidatorEngine.AddValidator(Type > > > > > entityType, IValidatableSubElementsInspector inspector) > > > > > em > > > > > > NHibernate.Validator.Event.ValidatePreInsertEventListener.Initialize(Configuration > > > > > cfg) > > > > > em > > > NHibernate.Event.EventListeners.InitializeListeners(Configuration > > > > > cfg, Object[] list) > > > > > em > > > NHibernate.Event.EventListeners.InitializeListeners(Configuration > > > > > cfg) > > > > > em > NHibernate.Cfg.Configuration.GetInitializedEventListeners() > > > > > em NHibernate.Cfg.Configuration.BuildSessionFactory() > > > > > d:\Builds\FluentNH\src\FluentNHibernate\Cfg > > > > > \FluentConfiguration.cs(93,0): em > > > > > FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() > > > > > > > Any suggestions please! > > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "Fluent NHibernate" group. > > > > > To post to this group, send email to > > > fluent-nhibern...@googlegroups.com. > > > > > To unsubscribe from this group, send email to > > > > > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > <fluent-nhibernate%2bunsubscr...@googlegroups.com<fluent-nhibernate%252bunsubscr...@googlegroups.com> > > > > > <fluent-nhibernate%2bunsubscr...@googlegroups.com<fluent-nhibernate%252bunsubscr...@googlegroups.com> > <fluent-nhibernate%252bunsubscr...@googlegroups.com<fluent-nhibernate%25252bunsubscr...@googlegroups.com> > > > > > > > > > . > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/fluent-nhibernate?hl=en. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Fluent NHibernate" group. > > > To post to this group, send email to > fluent-nhibern...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > <fluent-nhibernate%2bunsubscr...@googlegroups.com<fluent-nhibernate%252bunsubscr...@googlegroups.com> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/fluent-nhibernate?hl=en. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" group. > To post to this group, send email to fluent-nhibern...@googlegroups.com. > To unsubscribe from this group, send email to > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/fluent-nhibernate?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.