views:

12

answers:

1

Can someone tell me whats wrong with the nhibernate config below? Using the latest ODP.NET version.

<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
  <session-factory>
    <property name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver</property>
    <property name="connection.connection_string">DATA SOURCE=Oracle2;PERSIST SECURITY INFO=True;USER ID=***;PASSWORD=*****</property>
    <property name="show_sql">true</property>
    <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
    <property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
    <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
  </session-factory>
</hibernate-configuration>

I get the following error

Error 1 Test 'ODPNETNH.Tests.GenerateSchema_Fixture.Can_generate_schema' failed: NHibernate.MappingException : Could not compile the mapping document: ODPNETNH.Mappings.Vendor.hbm.xml
  ----> NHibernate.HibernateException : Could not instantiate dialect class NHibernate.Dialect.Oracle9Dialect
  ----> System.TypeLoadException : Could not load type NHibernate.Dialect.Oracle9Dialect. Possible cause: no assembly name specified.
at NHibernate.Cfg.Configuration.LogAndThrow(Exception exception)
at NHibernate.Cfg.Configuration.AddDeserializedMapping(HbmMapping mappingDocument, String documentFileName)
at NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc)
at NHibernate.Cfg.Configuration.ProcessMappingsQueue()
A: 

I think I figured it out. Had to call Configure("hibernate.cfg.xml");

Deepfreezed
Also, there is no dialect by NHibernate.Dialect.Oracle9Dialect. It has to be NHibernate.Dialect.Oracle9iDialect.
Deepfreezed