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

In ofbizsetup, create product category causes exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: commonext
    • Labels:
      None

      Description

      in ofbizsetup. create 1st productCategory gives exception.
      Seems that ofbiz tries to auto create a promotions category but the resulting productCategoryId is too long for for the database field defined as a varchar(20).
      My database is currently configured to use utf8.

      ...console output...
      INSERT INTO public.PRODUCT_CATEGORY (PRODUCT_CATEGORY_ID, PRODUCT_CATEGORY_TYPE_ID, PRIMARY_PARENT_CATEGORY_ID, CATEGORY_NAME, DESCRIPTION, LONG_DESCRIPTION, CATEGORY_IMAGE_URL, LINK_ONE_IMAGE_URL, LINK_TWO_IMAGE_URL, DETAIL_SCREEN, SHOW_IN_SELECT, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES ('MYCOCLG1_ID_PROMOTIONS', 'CATALOG_CATEGORY', NULL, 'MYCOCLG1_ID Promotions', NULL, NULL, NULL, NULL, NULL, 'component://ecommerce/widget/CatalogScreens.xml#categorydetailmatrix', NULL, '2015-05-29 13:03:32.740000 -04:00:00', '2015-05-29 13:03:32.587000 -04:00:00', '2015-05-29 13:03:32.740000 -04:00:00', '2015-05-29 13:03:32.587000 -04:00:00')
      2015-05-29 13:03:32,743 |ttp-bio-8443-exec-10 |GenericDelegator |E| Failure in create operation for entity [ProductCategory]: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ProductCategory][categoryName,MYCOCLG1_ID Promotions(java.lang.String)][createdStamp,2015-05-29 13:03:32.74(java.sql.Timestamp)][createdTxStamp,2015-05-29 13:03:32.587(java.sql.Timestamp)]detailScreen,component://ecommerce/widget/CatalogScreens.xml#categorydetailmatrix(java.lang.String)[lastUpdatedStamp,2015-05-29 13:03:32.74(java.sql.Timestamp)][lastUpdatedTxStamp,2015-05-29 13:03:32.587(java.sql.Timestamp)][productCategoryId,MYCOCLG1_ID_PROMOTIONS(java.lang.String)][productCategoryTypeId,CATALOG_CATEGORY(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.PRODUCT_CATEGORY (PRODUCT_CATEGORY_ID, PRODUCT_CATEGORY_TYPE_ID, PRIMARY_PARENT_CATEGORY_ID, CATEGORY_NAME, DESCRIPTION, LONG_DESCRIPTION, CATEGORY_IMAGE_URL, LINK_ONE_IMAGE_URL, LINK_TWO_IMAGE_URL, DETAIL_SCREEN, SHOW_IN_SELECT, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(20)))

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wt Wai
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: