http://ofbiz.116.s1.nabble.com/Users-PostalAddress-with-Foreign-Country-State-tp137992p137994.html
you probably just have to add a record in the Geo entity for the UP state.
> Hello,
>
>
>
> If I create a postal address, using XML import datasource, with
> STATE_PROVINCE_GEO_ID set to a foreign country state (“UP”), I get the
> following error
>
> ERROR: Error parsing entity xml file:
> org.ofbiz.entity.GenericEntityException: Exception while updating the
> following entity:
> [GenericEntity:PostalAddress][contactMechId,CompAddrIndia(java.lang.String)][lastUpdatedStamp,2006-03-20
> 08:28:35.906(java.sql.Timestamp)][lastUpdatedTxStamp,2006-03-20
> 08:28:35.859(java.sql.Timestamp)][stateProvinceGeoId,UP(java.lang.String)]
> (while updating:
> [GenericEntity:PostalAddress][contactMechId,CompAddrIndia(java.lang.String)][lastUpdatedStamp,2006-03-20
> 08:28:35.906(java.sql.Timestamp)][lastUpdatedTxStamp,2006-03-20
> 08:28:35.859(java.sql.Timestamp)][stateProvinceGeoId,UP(java.lang.String)]
> (SQL Exception while executing the following:UPDATE POSTAL_ADDRESS SET
> STATE_PROVINCE_GEO_ID=?, LAST_UPDATED_TX_STAMP=?, LAST_UPDATED_STAMP=?
> WHERE CONTACT_MECH_ID=? (Cannot add or update a child row: a foreign key
> constraint fails (`ofbiz/postal_address`, CONSTRAINT `POST_ADDR_SPGEO`
> FOREIGN KEY (`STATE_PROVINCE_GEO_ID`) REFERENCES `geo` (`GEO_ID`)))))
>
>
>
> The error definitely relates to “UP” since it works OK if I just change
> it to “CA”. Is this an error in xml import or is this the way it is
> supposed to work?
>
>
>
> Thanks in advance,
>
> Vinay Agarwal
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users