Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6070

Create content for product causes exception

    XMLWordPrintableJSON

Details

    Description

      Using demo data.
      https://localhost:8443/catalog/control/EditProductContent?productId=CPU-586
      Console output...

      2015-02-11 11:08:44,547 |http-bio-8443-exec-3 |ServiceEcaCondition |I| From Field (contentAssocTypeId) is not found in context for createContent, defaulting to null.
      2015-02-11 11:08:44,557 |http-bio-8443-exec-3 |ServiceEcaRule |I| For Service ECA [createContent] on [commit] got false for condition: [contentAssocTypeId][is-not-empty][true][String]
      2015-02-11 11:08:44,564 |http-bio-8443-exec-3 |ServiceEcaCondition |I| From Field (contentAssocTypeId) is not found in context for createContent, defaulting to null.
      2015-02-11 11:08:44,565 |http-bio-8443-exec-3 |ServiceEcaRule |I| For Service ECA [createContent] on [commit] got false for condition: [contentAssocTypeId][is-not-empty][true][String]
      2015-02-11 11:08:44,566 |http-bio-8443-exec-3 |ServiceEcaCondition |I| From Field (contentPurposeTypeId) is not found in context for createContent, defaulting to null.
      2015-02-11 11:08:44,567 |http-bio-8443-exec-3 |ServiceEcaRule |I| For Service ECA [createContent] on [commit] got false for condition: [contentPurposeTypeId][is-not-empty][true][String]
      2015-02-11 11:08:44,568 |http-bio-8443-exec-3 |ServiceEcaRule |I| Running Service ECA Service: createContentAlternativeUrl, triggered by rule on Service: createContent
      2015-02-11 11:08:44,581 |http-bio-8443-exec-3 |ServiceEcaRule |I| For Service ECA [createProductContent] on [in-validate] got false for condition: [contentId][is-empty][true][String]
      2015-02-11 11:08:44,635 |http-bio-8443-exec-3 |GenericDelegator |E| Failure in create operation for entity [ProductContent]: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ProductContent][contentId,10001(java.lang.String)][createdStamp,2015-02-11 11:08:44.587(java.sql.Timestamp)][createdTxStamp,2015-02-11 11:08:32.59(java.sql.Timestamp)][fromDate,2015-02-11 11:08:23.0(java.sql.Timestamp)][lastUpdatedStamp,2015-02-11 11:08:44.587(java.sql.Timestamp)][lastUpdatedTxStamp,2015-02-11 11:08:32.59(java.sql.Timestamp)][productContentTypeId,XTRA_IMG_E_SMALL(java.lang.String)][productId,CPU-586(java.lang.String)][thruDate,null()] (SQL Exception while executing the following:INSERT INTO PRODUCT_CONTENT (PRODUCT_ID, CONTENT_ID, PRODUCT_CONTENT_TYPE_ID, FROM_DATE, THRU_DATE, PURCHASE_FROM_DATE, PURCHASE_THRU_DATE, USE_COUNT_LIMIT, USE_TIME, USE_TIME_UOM_ID, USE_ROLE_TYPE_ID, SEQUENCE_NUM, 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_CONTENT`, CONSTRAINT `PROD_CNT_TYPE` FOREIGN KEY (`PRODUCT_CONTENT_TYPE_ID`) REFERENCES `PRODUCT_CONTENT_TYPE` (`PRODUCT_CONTENT_TYPE_ID`)))). Rolling back transaction.

      Attachments

        Activity

          People

            deepak Deepak Dixit
            wt Wai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: