-->
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.  [ 3 posts ] 
Author Message
 Post subject: SAXParseException parsing generated hbm.xml files
PostPosted: Tue Jul 27, 2004 12:39 am 
Beginner
Beginner

Joined: Tue Apr 06, 2004 6:13 pm
Posts: 39
Location: Pune, Maharashtra, INDIA
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 ?

_________________
thks
G1


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 27, 2004 5:20 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
What are you using to generate the HBMs?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 27, 2004 5:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Oh I should read more carefully - XDoclet.
I had a quick look through the DTD and from what I can see it should be fine.

Maybe you don't have HIbernate jar on your class path correctly or an older version.


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

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.