There is a unique constraint placed on the [cardId] column of the PERSON table and it is causing (at least, it's the first of hundreds of errors) the demo data to fail to load. I believe there is something more fundamentally wrong with this constraint in SQL Server however, as when I tried to install ofbiz with only seed data and then perform the setup steps at http://<server>/ofbizsetup, I was unable to complete the initial setup due to the same constraint being violated.
My environment:
MS SQL Server 2008
sqljdbc4 drivers
Steps to reproduce:
Start with download of ofbiz-13.07.01
Followed the MS SQL setup steps in the entityengine.xml file
./ant build
./ant load-demo
First error from logs is below:
[java] 20141016110019633 |main |GenericDelegator |E| Failure in create operation for entity [Person]: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:Person
][createdStamp,2014-10-16 11:00:19.628(java.sql.Timestamp)][createdTxStamp,2014-10-16 11:00:19.623(java.sql.Timestamp)][lastUpdatedStamp,2014-10-16 11:00:19.628(java.sql.Timestamp)][lastUpdatedTxStamp,2014-10-16
11:00:19.623(java.sql.Timestamp)][partyId,_NA_(java.lang.String)] (SQL Exception while executing the following:INSERT INTO dbo.PERSON (PARTY_ID, SALUTATION, FIRST_NAME, MIDDLE_NAME, LAST_NAME, PERSONAL_TITLE, S
UFFIX, 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, PASS
PORT_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, L
AST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Cannot insert dupli
cate key row in object 'dbo.PERSON' with unique index 'CARD_ID_IDX'. The duplicate key value is (<NULL>).)). Rolling back transaction.