Hibernate 3.0
DB Postgres
I am trying to get a list which is an attribute of my class Server. It is a list of class Service. The db tables here are a many to many. So I have table server, service, and serverservice. table serverservice has 3 columns the primary key and teh 2 foriegn keys. Here is the error I am getting and the mapping file. I know I am leaving something out of teh mapping file but I am not sure what.
here is my list in the mapping
Code:
<list name="services" table="serverservice" cascade="save-update" lazy="true">
<key>
<column name="fkserver" not-null="false"/>
</key>
<many-to-many class="edu.bju.aem.util.model.Service" column="fkservice" />
</list>
Caused by: org.hibernate.MappingException: invalid mapping
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:399)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:449)
... 16 more
Caused by: org.xml.sax.SAXParseException: The content of element type "list" must match "(meta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,filter*)".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)[/code]