Hi,
I configured the hibernate-intro project to generate hbm.xml files with Xdoclet.
Howver when executed the jvm throws a SAXParseException,
Code:
DEBUG: 2004-07-26 17:18:09,953: DTDEntityResolver: trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/
DEBUG: 2004-07-26 17:18:09,953: DTDEntityResolver: found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
ERROR: 2004-07-26 17:18:09,984: XMLHelper$ErrorLogger: Error parsing XML: XML InputStream(52)
org.xml.sax.SAXParseException: Attribute "access" must be declared for element type "many-to-one".
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)
My hbm xml file is
Code:
<many-to-one
name="tbInstitution"
class="com.fiserv.cm.hibernate.dao.InstitutionDAO"
cascade="none"
outer-join="auto"
update="true"
insert="true"
access="property"
>
<column
name="INSTITUTION_ID"
/>
</many-to-one>
It also throws this exception when the hbm.xml tag is <property.
I am using.
commons-collections-2.0.jar
commons-logging.jar
log4j.jar
xdoclet-1.2.1.jar
xdoclet-hibernate-module-1.2.1.jar
xdoclet-xdoclet-module-1.2.1.jar
xjavadoc-1.0.3.jar
I can solve this method for now (with under hand methods) - Edit the generated hbm.xml files in Text pad and remove the offending attribute.
But is there any elegant solution ?