Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6756631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:32:52+00:00 2026-05-26T13:32:52+00:00

I get the following error when running any NUnit integration test – Assembly setup

  • 0

I get the following error when running any NUnit integration test

- Assembly setup complete -
Beginning Processing of Tests -
Test 'PXL.IntegrationTests.EventDaoTests.deleteEvent' failed: Spring.Objects.Factory.ObjectCreationException : Error creating object with name 'NHibernateSessionFactory' defined in 'assembly [PXL.Dao.NHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null], resource [PXL.Dao.NHibernate.Dao.Dao.xml] line 18' : Initialization of object failed : Association references unmapped class: PXL.Domain.TBEvent
  ----> NHibernate.MappingException : Association references unmapped class: PXL.Domain.TBEvent
at Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure)
at Spring.Objects.Factory.Support.AbstractObjectFactory.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments)
at Spring.Objects.Factory.Support.AbstractObjectFactory.GetObjectInternal(String name, Type requiredType, Object[] arguments, Boolean suppressConfigure)
at Spring.Objects.Factory.Support.DefaultListableObjectFactory.GetObjectsOfType(Type type, Boolean includePrototypes, Boolean includeFactoryObjects)
at Spring.Objects.Factory.ObjectFactoryUtils.ObjectsOfTypeIncludingAncestors(IListableObjectFactory factory, Type type, Boolean includePrototypes, Boolean includeFactoryObjects)
at Spring.Dao.Support.PersistenceExceptionTranslationInterceptor.DetectPersistenceExceptionTranslators(IListableObjectFactory objectFactory)
at Spring.Dao.Attributes.PersistenceExceptionTranslationPostProcessor.set_ObjectFactory(IObjectFactory value)
at Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper)
at Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure)
at Spring.Objects.Factory.Support.AbstractObjectFactory.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments)
at Spring.Objects.Factory.Support.AbstractObjectFactory.GetObjectInternal(String name, Type requiredType, Object[] arguments, Boolean suppressConfigure)
at Spring.Objects.Factory.Support.DefaultListableObjectFactory.GetObjectsOfType(Type type, Boolean includePrototypes, Boolean includeFactoryObjects)
at Spring.Context.Support.AbstractApplicationContext.RegisterObjectPostProcessors(IConfigurableListableObjectFactory objectFactory)
at Spring.Context.Support.AbstractApplicationContext.Refresh()
at Spring.Testing.NUnit.AbstractSpringContextTests.LoadContextLocations(String[] locations)
at Spring.Testing.NUnit.AbstractDependencyInjectionSpringContextTests.SetUp()
--MappingException
at NHibernate.Cfg.XmlHbmBinding.CollectionBinder.BindCollectionSecondPass(XmlNode node, Collection model, IDictionary`2 persistentClasses, IDictionary`2 inheritedMetas)
at NHibernate.Cfg.XmlHbmBinding.CollectionBinder.<>c__DisplayClassd.<AddCollectionSecondPass>b__c(IDictionary`2 persistentClasses)
at NHibernate.Cfg.Configuration.SecondPassCompile()
at Spring.Data.NHibernate.LocalSessionFactoryObject.AfterPropertiesSet()
at Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition)
at Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper)
at Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure)

Assembly TearDown

0 passed, 1 failed, 0 skipped, took 4.67 seconds (NUnit 2.5.5).

The line of code that the error refers to is the NHibernate Dao Configuration 1st line.

<!-- NHibernate Configuration -->
<object id="NHibernateSessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate21" scope="application">
    <property name="DbProvider" ref="DbProvider"/>
    <property name="MappingAssemblies">
        <list>
            <value>PXL.Dao.NHibernate</value>
        </list>
    </property>
    <property name="HibernateProperties">
        <dictionary>
            <entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
            <entry key="dialect" value="NHibernate.Dialect.MsSql2008Dialect"/>
            <entry key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/>
        </dictionary>
    </property>

    <!-- provides integation with Spring's declarative transaction management features -->
    <property name="ExposeTransactionAwareSessionFactory" value="true" />
</object>

The missing file that it refers to “Association references unmapped class: PXL.Domain.TBEvent” does exist and as far as I can see there is nothing missing, the mapping file has no errors in it and there is a cs file for it to map to and all the interfaces exist and the row in the dao which refers to it also exists.

<object id="TBEventDao" type="PXL.Dao.NHibernate.HibernateTBEventDao, PXL.Dao.NHibernate">
    <property name="SessionFactory" ref="NHibernateSessionFactory"/>
</object>

I know this is something simple, wonder if anyone here can give me some insight.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:32:53+00:00Added an answer on May 26, 2026 at 1:32 pm

    Make sure the Build Action of your mapping xml file is set to Embedded Resource and that the extension is .hmb.xml.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We get the following error when running at test: ContextSwitchDeadlock was detected Message: The
I get the following error when running my Visual Studio 2008 ASP.NET project (start
I get the following error when running FXCop: CA1800 : Microsoft.Performance : 'obj', a
I get the following error pretty regularly when compiling in Visual Studio and running
When running rspec I get the following error: no such file to load --
When running a Python program that reads from stdin, I get the following error:
I get following error when deploying on test server with II6 and Framework 3.5
Running the following C# code through NUnit yields Test.ControllerTest.TestSanity: Expected: `<System.DivideByZeroException>` But was: null
I am using GWT2.0.1,when I am running web application then I get following error
Running ubuntu 9.04 jaunty. When I run make I get the following error: Python

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.