These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: <hibernate-mapping .. was not expected
PostPosted: Fri Oct 09, 2009 6:38 pm 
Beginner
Beginner

Joined: Thu Oct 08, 2009 11:44 am
Posts: 21
Location: Chicago
I have a Table with a hbn.xml file that is not getting compiled properly. I change the xmlns on the header and I
can see that it is picking up the file but for some reason can't compile it.


In the app.config I have.

<configSections>
<section
name="hibernate-configuration"
type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"
/>
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</property>
<property name="connection.driver_class">
NHibernate.Driver.SqlClientDriver
</property>
<property name="connection.connection_string">
Server=(local);database=Pets;Integrated Security=True;User ID=xxx;Password=xxx
</property>
<property name="dialect">
NHibernate.Dialect.MsSql2005Dialect
</property>
<property name="show_sql">
false
</property>
</session-factory>
</hibernate-configuration>


and the Accounts.hbm.xml looks like:

<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-configuration-2.2" auto-import="true">
<class name="BDM_Controller.Source.ORM.DB_Accounts, BDM_Controller" table="Accounts">
<id name="AccountNumber" type="String" length="9"/>
<property name="ShortTitle" type="String" length="36"/>
<property name="AlphaListNumber" type="String" length="7"/>

lines omitted

<property name="ValuationFee2PaymentMethod" type="String" length="1"/>
<property name="RelationshipCode" type="String" length="7"/>
</class>
</hibernate-mapping>


I Dont know what is missing? Any Ideas?

Thanks,

--John Putnam


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.