Announcement Announcement Module
No announcement yet.
Invalid Mapping Error: in hibernate Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Invalid Mapping Error: in hibernate

    I am trying to configure a second datasource, second sessionfactory and second transaction manager in my application context.
    I have provided the mapping files and when i restart the server, i get the below exception:
    Error parsing XML: XML InputStream(50) The content of element type "hibernate-mapping" must match "(meta*,typedef*,import*,(class|subclass|joine d-subclass|union-subclass)*,(query|sql-query)*,filter-def*)".

    I am using the component mapping of hibernate:
    <!DOCTYPE hibernate-mapping PUBLIC 
    	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    <hibernate-mapping package="com.citigroup.rel.adg.domain.ccrm">
    	<class name="ContactInfo" table="CONTACT_INFO">
            <id name="contactId" type="long">
            	<column name="CONTACT_ID"/>
            	<generator class="sequence">
                	<param name="sequence">contact_info_seq</param>
    		<property name="faxNumber" type="string">
            	<column name="FAX_NMBR"/>
            <component name="address" class="Address">
    			<property name="zip"		type="string" column="ZIP"/>
    			<property name="address1" 	type="string" column="STREET1"/>
    			<property name="address2" 	type="string" column="STREET2"/>
    			<property name="city" 		type="string" column="CITY"/>
    			<property name="state" 		type="string" column="STATE_PROVINCE"/>
    			<property name="postalCode" type="string" column="POSTAL_CODE"/>			
    			<property name="country" 	type="string" column="COUNTRY"/>			
    			<property name="addressTypeId" 	column="ADDRESS_TYPE_ID"/>									
    can someone pls explain whats wrong?

  • #2
    how did you create your hbm fle, with xdoclet??

    if the answer is yes, post your code

    I have provided the mapping files and when i restart the server, i get the below exception:
    how many hbm files you have?, and how you know which thrown the error?



    • #3
      Thanks for the rep!


      i did check my mapping file again! and saw that the association mapping was wrong. and i corrected it!.its working fine now!..thanks a lot!