On 5/30/07, James Mc Millan <[EMAIL PROTECTED]> wrote:
> It sounds like the error is in one of your hibernate mappingings, you can
> try looking through all your .hbm.xml's with 198 or more lines...
>
I used XML Spy to validate the generated hbm.xml files and found
out that indeed
one of my hbm.xml , namely Person.hbm.xml , file is failing validation
in XML Spy .The offending part is "unique" attribute which appears
twice in the following entry :
<many-to-one
name="contactDetails"
class="za.co.introspect.portal.ContactDetails"
cascade="save-update"
outer-join="auto"
update="true"
insert="true"
unique="true"
column="contactdetails_id"
not-null="false"
unique="true"
/>
These hbm.xml files are being generated using the xdoclet tool.I'm
using both Ant and Maven to build my application's ear files.The ear
file build by Ant deploys successfully even and the Maven one fails ,
even though they both have the same NOT-WELL formed Person.hbm.xml.
Initially I thought there's a difference in version between the dom4j
jars in the ear files , but both are using the same one ,
dom4j-1.6.1.jar.
How then is it possible that the NOT-WELL formed Person.hbm.xml
passes validation in the Ant generated ear file , but fails in the
Maven generated ear file?What could I be over looking here?
Why is xdoclet generating the two "unique" fields ? The code looks like :
/**
* @return the contact details linked to the person
* @hibernate.many-to-one class="za.co.introspect.portal.ContactDetails"
* cascade="save-update"
* column="contactdetails_id" not-null="false" unique="true"
*/
public ContactDetails getContactDetails() {
return contactDetails;
}
public void setContactDetails(ContactDetails contactDetails) {
this.contactDetails = contactDetails;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CTJUG Forum" 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/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---