ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erwan de FERRIERES <erwan.de-ferrie...@nereide.fr>
Subject Re: Exception occured when I try to add a new person
Date Wed, 04 May 2011 09:13:11 GMT
Le 04/05/2011 05:18, Leon2 a écrit :
> The exception throwed in backend is something like:
> RROR: parsing file: ERROR parsing Entity Xml file:
> org.ofbiz.entity.GenericEntityException: Error while inserting:
> [GenericEntity:Person][createdStamp,2011-04-28
> 11:09:55.29(java.sql.Timestamp)][createdTxStamp,2011-04-28
> 11:09:55.288(java.sql.Timestamp)][lastUpdatedStamp,2011-04-28
> 11:09:55.29(java.sql.Timestamp)][lastUpdatedTxStamp,2011-04-28
> 11:09:55.288(java.sql.Timestamp)][partyId,_NA_(java.lang.String)] (SQL
> Exception while executing the following:INSERT INTO OFBIZ.PERSON (PARTY_ID,
> SALUTATION, FIRST_NAME, MIDDLE_NAME, LAST_NAME, PERSONAL_TITLE, SUFFIX,
> NICKNAME, FIRST_NAME_LOCAL, MIDDLE_NAME_LOCAL, LAST_NAME_LOCAL, OTHER_LOCAL,
> MEMBER_ID, GENDER, BIRTH_DATE, DECEASED_DATE, HEIGHT, WEIGHT,
> MOTHERS_MAIDEN_NAME, MARITAL_STATUS, SOCIAL_SECURITY_NUMBER,
> PASSPORT_NUMBER, PASSPORT_EXPIRE_DATE, TOTAL_YEARS_WORK_EXPERIENCE,
> COMMENTS, EMPLOYMENT_STATUS_ENUM_ID, RESIDENCE_STATUS_ENUM_ID, OCCUPATION,
> YEARS_WITH_EMPLOYER, MONTHS_WITH_EMPLOYER, EXISTING_CUSTOMER, CARD_ID,
> LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP)
> VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (The statement was aborted because it
> would have caused a duplicate key value in a unique or primary key
> constraint or unique index identified by 'PERSON_TXCRTS' defined on
> 'PERSON'.))
>
> ----
> If I remove the CARD_ID_IDX index (the unique index on Person.cardId), then
> it works.
>
> btw, in fact, if I use run-install command to re-create the database and
> import all demo data, ton of such kind "duplicate key value" exception was
> thrown out.

to recreate the database, if using derby, you have to make an ant 
clean-all which will remove the database. if you are runnnig run-install 
2 times, it will then have duplicate values.

>
> I test this on ofbiz svn trunk and the database I use is derby 10.7.
>
> I guess maybe this is the defect related to derby 10.7. If that's true, can
> we downgrade the derby to 10.5 or even ealier?
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Exception-occured-when-I-try-to-add-a-new-person-tp3494394p3494394.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>


-- 
Erwan de FERRIERES
www.nereide.biz

Mime
View raw message