read the inner exception message, it should give you a good hint on whats wrong.
On Fri, Aug 27, 2010 at 4:30 PM, PLen <[email protected]> wrote: > Hello, > > I am using Visual Studio 2008, nHibernate v2.1.2, and an Oracle 10g > database. I have a simple database table with four columns (a > record_id populated by a sequence, name, city, year). When I try to > run the app, I get t he following error: > > Could not compile the mapping document: > FirstSample.Mappings.Tester.hbm.xml > > The mapping file looks like: > -------------------------- > <?xml version="1.0" encoding="utf-8"?> > <hibernate-mapping assembly="FirstSample" xmlns="urn:nhibernate- > mapping-2.2"> > <class name="FirstSample.Domain.Tester, FirstSample" table="TESTER" > lazy="true" > > <id name="recordId" type="Int64" column="RECORD_ID" > access="field"> > <generator class="sequence"> > <param name="sequence">TESTER_SEQ</param> > </generator> > </id> > <property name="City" column="CITY" access="field" /> > <property name="Name" column="NAME" access="field" /> > <property name="Year" column="YEAR" access="field" /> > </class> > </hibernate-mapping> > ------------------------- > > The hibernate.cfg.xml looks like: > ------------------------- > <property > name="connection.provider">NHibernate.Connection.DriverConnectionProvider</ > property> > <property name="dialect">NHibernate.Dialect.Oracle10gDialect</ > property> > <property > name="connection.driver_class">NHibernate.Driver.OracleClientDriver</ > property> > <property name="connection.connection_string">User > ID=iceberg;Password=iceberg;Data > Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) > (HOST=LOCALHOST)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED) > (SERVER_NAME=XE)))</property> > <property > > name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, > NHibernate.ByteCode.Castle</property> > <property name="show_sql">true</property> > ------------------------- > > The Tester.cs class looks like: > ------------------------ > public class Tester { > private string city; > private string name; > private long recordId; > private long year; > public Tester() { } > public virtual string City { > get { return this.city; } > set { this.city = value; } > } > public virtual string Name { > get { return this.name; } > set { this.name = value; } > } > public virtual long RecordId { > get { return this.recordId; } > set { this.recordId = value; } > } > public virtual long Year { > get { return this.year; } > set { this.year = value; } > } > } > --------------------------------------- > > As a side note, I had the class and mapping file generated by > NHibernate Mapping Generator. > > Any ideas would be greatly appreciated. > > Thanks - Peter > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
