Here is a scenario I tried, which I am sure people are using now:
Export a GlAccount list from a working instance of the ofbiz -
using the
WebTool XML Data Export
Move the file to a new instance of ofbiz that has no GlAccount list
loaded
Import the GlAccount list file into ofbiz - using the WebTool XML Data
Import
I didn't check any of the option boxes on the import screen and got
the
error below.
Then I checked create dummy FK's and the import ran ok.
What is "dummy FK" and will I be alright with that mode of import?
Is there
a situation where you would NOT do this to make it work?
Original error:
ERROR: Error parsing entity xml file:
org.ofbiz.entity.GenericEntityException: Exception while inserting the
following entity:
[GenericEntity:GlAccount][accountCode,902000(java.lang.String)]
[accountName,
STATE INCOME TAX(java.lang.String)][createdStamp,2006-08-16
08:03:35.706(java.sql.Timestamp)][createdTxStamp,2006-08-16
08:03:35.622(java.sql.Timestamp)][glAccountClassId,NON_POSTING
(java.lang.Str
ing)][glAccountId,902000(java.lang.String)][glResourceTypeId,MONEY
(java.lang
.String)][lastUpdatedStamp,2006-08-16
08:03:35.706(java.sql.Timestamp)][lastUpdatedTxStamp,2006-08-16
08:03:35.622(java.sql.Timestamp)][parentGlAccountId,900000
(java.lang.String)
][postedBalance,0.0(java.lang.Double)] (while inserting:
[GenericEntity:GlAccount][accountCode,902000(java.lang.String)]
[accountName,
STATE INCOME TAX(java.lang.String)][createdStamp,2006-08-16
08:03:35.706(java.sql.Timestamp)][createdTxStamp,2006-08-16
08:03:35.622(java.sql.Timestamp)][glAccountClassId,NON_POSTING
(java.lang.Str
ing)][glAccountId,902000(java.lang.String)][glResourceTypeId,MONEY
(java.lang
.String)][lastUpdatedStamp,2006-08-16
08:03:35.706(java.sql.Timestamp)][lastUpdatedTxStamp,2006-08-16
08:03:35.622(java.sql.Timestamp)][parentGlAccountId,900000
(java.lang.String)
][postedBalance,0.0(java.lang.Double)] (SQL Exception while
executing the
following:INSERT INTO GL_ACCOUNT (GL_ACCOUNT_ID, GL_ACCOUNT_TYPE_ID,
GL_ACCOUNT_CLASS_ID, GL_RESOURCE_TYPE_ID, GL_XBRL_CLASS_ID,
PARENT_GL_ACCOUNT_ID, ACCOUNT_CODE, ACCOUNT_NAME, DESCRIPTION,
PRODUCT_ID,
POSTED_BALANCE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP,
CREATED_STAMP,
CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
(Cannot add or update a child row: a foreign key constraint fails
(`opentaps/GL_ACCOUNT`, CONSTRAINT `GLACCT_PAR` FOREIGN KEY
(`PARENT_GL_ACCOUNT_ID`) REFERENCES `GL_ACCOUNT` (`GL_ACCOUNT_ID`)))))
Claude Feistel