You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by wp...@gmail.com, wp...@gmail.com on 2018/06/06 16:44:45 UTC

Error message when trying to enter 'FIN ACCTS' in Stores

I get this massive error  message when triying to add fin accts for a store
The legal entity, GL chart of accounts, etc.. is setup.

Thanks for helping. Wolfgang

2018-06-06 18:40:13,615 |http-nio-8443-exec-1 |RequestHandler |E| Request CreateProductStoreFinAccountSettings caused an error with the following message: Error doing entity-auto operation for entity ProductStoreFinActSetting in service createProductStoreFinActSetting: org.apache.ofbiz.entity.GenericEntityException: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ProductStoreFinActSetting][accountCodeLength,12(java.lang.Long)][accountValidDays,365(java.lang.Long)][allowAuthToNegative,Y(java.lang.String)][authValidDays,5(java.lang.Long)][createdStamp,2018-06-06 18:40:13.609(java.sql.Timestamp)][createdTxStamp,2018-06-06 18:40:13.594(java.sql.Timestamp)][finAccountTypeId,GIFTCERT_ACCOUNT(java.lang.String)][lastUpdatedStamp,2018-06-06 18:40:13.609(java.sql.Timestamp)][lastUpdatedTxStamp,2018-06-06 18:40:13.594(java.sql.Timestamp)][minBalance,null()][pinCodeLength,4(java.lang.Long)][productStoreId,10000(java.lang.String)][purchSurveyCopyMe,copyMe(java.lang.String)][purchSurveySendTo,recipientEmail(java.lang.String)][purchaseSurveyId,1100(java.lang.String)][replenishMethodEnumId,FARP_TOP_OFF(java.lang.String)][replenishThreshold,null()][requirePinCode,N(java.lang.String)][validateGCFinAcct,Y(java.lang.String)] (SQL Exception while executing the following:INSERT INTO PRODUCT_STORE_FIN_ACT_SETTING (PRODUCT_STORE_ID, FIN_ACCOUNT_TYPE_ID, REQUIRE_PIN_CODE, VALIDATE_G_C_FIN_ACCT, ACCOUNT_CODE_LENGTH, PIN_CODE_LENGTH, ACCOUNT_VALID_DAYS, AUTH_VALID_DAYS, PURCHASE_SURVEY_ID, PURCH_SURVEY_SEND_TO, PURCH_SURVEY_COPY_ME, ALLOW_AUTH_TO_NEGATIVE, MIN_BALANCE, REPLENISH_THRESHOLD, REPLENISH_METHOD_ENUM_ID, 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 (`ofbiz`.`PRODUCT_STORE_FIN_ACT_SETTING`, CONSTRAINT `PRSTFNAC_SRVY` FOREIGN KEY (`PURCHASE_SURVEY_ID`) REFERENCES `SURVEY` (`SURVEY_ID`)))) (Error while inserting: [GenericEntity:ProductStoreFinActSetting][accountCodeLength,12(java.lang.Long)][accountValidDays,365(java.lang.Long)][allowAuthToNegative,Y(java.lang.String)][authValidDays,5(java.lang.Long)][createdStamp,2018-06-06 18:40:13.609(java.sql.Timestamp)][createdTxStamp,2018-06-06 18:40:13.594(java.sql.Timestamp)][finAccountTypeId,GIFTCERT_ACCOUNT(java.lang.String)][lastUpdatedStamp,2018-06-06 18:40:13.609(java.sql.Timestamp)][lastUpdatedTxStamp,2018-06-06 18:40:13.594(java.sql.Timestamp)][minBalance,null()][pinCodeLength,4(java.lang.Long)][productStoreId,10000(java.lang.String)][purchSurveyCopyMe,copyMe(java.lang.String)][purchSurveySendTo,recipientEmail(java.lang.String)][purchaseSurveyId,1100(java.lang.String)][replenishMethodEnumId,FARP_TOP_OFF(java.lang.String)][replenishThreshold,null()][requirePinCode,N(java.lang.String)][validateGCFinAcct,Y(java.lang.String)] (SQL Exception while executing the following:INSERT INTO PRODUCT_STORE_FIN_ACT_SETTING (PRODUCT_STORE_ID, FIN_ACCOUNT_TYPE_ID, REQUIRE_PIN_CODE, VALIDATE_G_C_FIN_ACCT, ACCOUNT_CODE_LENGTH, PIN_CODE_LENGTH, ACCOUNT_VALID_DAYS, AUTH_VALID_DAYS, PURCHASE_SURVEY_ID, PURCH_SURVEY_SEND_TO, PURCH_SURVEY_COPY_ME, ALLOW_AUTH_TO_NEGATIVE, MIN_BALANCE, REPLENISH_THRESHOLD, REPLENISH_METHOD_ENUM_ID, 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 (`ofbiz`.`PRODUCT_STORE_FIN_ACT_SETTING`, CONSTRAINT `PRSTFNAC_SRVY` FOREIGN KEY (`PURCHASE_SURVEY_ID`) REFERENCES `SURVEY` (`SURVEY_ID`)))))

Re: Error message when trying to enter 'FIN ACCTS' in Stores

Posted by Paul Foxworthy <pa...@cohsoft.com.au>.
Hi Wolfgang,

It's saying the PurchaseSurveyId in your ProductStore refers to a
non-existent Survey with an ID of 1100.

Either create a Survey first, or correct the 1100 to a valid ID for a
Survey, or change the data for the ProductStore so there is no mention of a
Survey.

Cheers

Paul Foxworthy


On 7 June 2018 at 02:44, wp.rauchholz@gmail.com <wp...@gmail.com>
wrote:

> I get this massive error  message when triying to add fin accts for a store
> The legal entity, GL chart of accounts, etc.. is setup.
>
> Thanks for helping. Wolfgang
>
> 2018-06-06 18:40:13,615 |http-nio-8443-exec-1 |RequestHandler |E| Request
> CreateProductStoreFinAccountSettings caused an error with the following
> message: Error doing entity-auto operation for entity
> ProductStoreFinActSetting in service createProductStoreFinActSetting:
> org.apache.ofbiz.entity.GenericEntityException: org.apache.ofbiz.entity.GenericEntityException:
> Error while inserting: [GenericEntity:ProductStoreFinActSetting][
> accountCodeLength,12(java.lang.Long)][accountValidDays,
> 365(java.lang.Long)][allowAuthToNegative,Y(java.
> lang.String)][authValidDays,5(java.lang.Long)][createdStamp,2018-06-06
> 18:40:13.609(java.sql.Timestamp)][createdTxStamp,2018-06-06
> 18:40:13.594(java.sql.Timestamp)][finAccountTypeId,
> GIFTCERT_ACCOUNT(java.lang.String)][lastUpdatedStamp,2018-06-06
> 18:40:13.609(java.sql.Timestamp)][lastUpdatedTxStamp,2018-06-06
> 18:40:13.594(java.sql.Timestamp)][minBalance,null()]
> [pinCodeLength,4(java.lang.Long)][productStoreId,10000(java.lang.String)][
> purchSurveyCopyMe,copyMe(java.lang.String)][purchSurveySendTo,
> recipientEmail(java.lang.String)][purchaseSurveyId,
> 1100(java.lang.String)][replenishMethodEnumId,FARP_
> TOP_OFF(java.lang.String)][replenishThreshold,null()][
> requirePinCode,N(java.lang.String)][validateGCFinAcct,Y(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO
> PRODUCT_STORE_FIN_ACT_SETTING (PRODUCT_STORE_ID, FIN_ACCOUNT_TYPE_ID,
> REQUIRE_PIN_CODE, VALIDATE_G_C_FIN_ACCT, ACCOUNT_CODE_LENGTH,
> PIN_CODE_LENGTH, ACCOUNT_VALID_DAYS, AUTH_VALID_DAYS, PURCHASE_SURVEY_ID,
> PURCH_SURVEY_SEND_TO, PURCH_SURVEY_COPY_ME, ALLOW_AUTH_TO_NEGATIVE,
> MIN_BALANCE, REPLENISH_THRESHOLD, REPLENISH_METHOD_ENUM_ID,
> 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
> (`ofbiz`.`PRODUCT_STORE_FIN_ACT_SETTING`, CONSTRAINT `PRSTFNAC_SRVY`
> FOREIGN KEY (`PURCHASE_SURVEY_ID`) REFERENCES `SURVEY` (`SURVEY_ID`))))
> (Error while inserting: [GenericEntity:ProductStoreFinActSetting][
> accountCodeLength,12(java.lang.Long)][accountValidDays,
> 365(java.lang.Long)][allowAuthToNegative,Y(java.
> lang.String)][authValidDays,5(java.lang.Long)][createdStamp,2018-06-06
> 18:40:13.609(java.sql.Timestamp)][createdTxStamp,2018-06-06
> 18:40:13.594(java.sql.Timestamp)][finAccountTypeId,
> GIFTCERT_ACCOUNT(java.lang.String)][lastUpdatedStamp,2018-06-06
> 18:40:13.609(java.sql.Timestamp)][lastUpdatedTxStamp,2018-06-06
> 18:40:13.594(java.sql.Timestamp)][minBalance,null()]
> [pinCodeLength,4(java.lang.Long)][productStoreId,10000(java.lang.String)][
> purchSurveyCopyMe,copyMe(java.lang.String)][purchSurveySendTo,
> recipientEmail(java.lang.String)][purchaseSurveyId,
> 1100(java.lang.String)][replenishMethodEnumId,FARP_
> TOP_OFF(java.lang.String)][replenishThreshold,null()][
> requirePinCode,N(java.lang.String)][validateGCFinAcct,Y(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO
> PRODUCT_STORE_FIN_ACT_SETTING (PRODUCT_STORE_ID, FIN_ACCOUNT_TYPE_ID,
> REQUIRE_PIN_CODE, VALIDATE_G_C_FIN_ACCT, ACCOUNT_CODE_LENGTH,
> PIN_CODE_LENGTH, ACCOUNT_VALID_DAYS, AUTH_VALID_DAYS, PURCHASE_SURVEY_ID,
> PURCH_SURVEY_SEND_TO, PURCH_SURVEY_COPY_ME, ALLOW_AUTH_TO_NEGATIVE,
> MIN_BALANCE, REPLENISH_THRESHOLD, REPLENISH_METHOD_ENUM_ID,
> 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
> (`ofbiz`.`PRODUCT_STORE_FIN_ACT_SETTING`, CONSTRAINT `PRSTFNAC_SRVY`
> FOREIGN KEY (`PURCHASE_SURVEY_ID`) REFERENCES `SURVEY` (`SURVEY_ID`)))))
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: info@coherentsoftware.com.au