there error does not deal with length issures.  again this not a bug.
https://localhost:8443/webtools/control/ViewRelations?entityName=ProdCatalogCategory
see the FK PROD_CC_CATEGORY.

Yin T (JIRA) sent the following on 11/12/2007 2:29 PM:
>     [ 
> https://issues.apache.org/jira/browse/OFBIZ-1399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541965
>  ] 
> 
> Yin T commented on OFBIZ-1399:
> ------------------------------
> 
> I tried to use a different category name that is much shorter than 20 
> characters.  It is still giving me an error message.
> When I try to create a new category with a shorter category id, error message 
> is shown following...
> 
> The Following Errors Occurred:
> 
> ERROR: Could not complete the Add Category To ProdCatalog 
> [file:/C:/Documents%20and%20Settings/wt/My%20Documents/MyEclipse/workspace/ofbiz/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml#addProductCategoryToProdCatalog]
>  process [problem creating the newEntity value: Error while inserting: 
> [GenericEntity:ProdCatalogCategory][createdStamp,2007-11-12 
> 17:11:58.62(java.sql.Timestamp)][createdTxStamp,2007-11-12 
> 17:11:58.549(java.sql.Timestamp)][fromDate,2007-11-12 
> 17:11:58.62(java.sql.Timestamp)][lastUpdatedStamp,2007-11-12 
> 17:11:58.62(java.sql.Timestamp)][lastUpdatedTxStamp,2007-11-12 
> 17:11:58.549(java.sql.Timestamp)][prodCatalogCategoryTypeId,PCCT_ADMIN_ALLW(java.lang.String)][prodCatalogId,wt-catalog1-id(java.lang.String)][productCategoryId,wtcatg1_id(java.lang.String)][sequenceNum,null()][thruDate,null()]
>  (SQL Exception while executing the following:INSERT INTO 
> OFBIZ.PROD_CATALOG_CATEGORY (PROD_CATALOG_ID, PRODUCT_CATEGORY_ID, 
> PROD_CATALOG_CATEGORY_
TYPE_ID, FROM_DATE, THRU_DATE, SEQUENCE_NUM, LAST_UPDATED_STAMP, 
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, 
?, ?, ?, ?, ?) (INSERT on table 'PROD_CATALOG_CATEGORY' caused a violation of 
foreign key constraint 'PROD_CC_CATEGORY' for key (wtcatg1_id). The statement 
has been rolled back.))]
> 
> 
>> Cannot create a category for a catalog
>> --------------------------------------
>>
>>                 Key: OFBIZ-1399
>>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1399
>>             Project: OFBiz
>>          Issue Type: Bug
>>          Components: framework
>>    Affects Versions: SVN trunk
>>         Environment: OpenSuse 10.3
>> Eclipse3.3
>> SVN trunk sources downloaded on Nov 12,2007
>> java version "1.6.0_03"
>> Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
>> Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)
>>            Reporter: Yin T
>>
>> goto https://localhost:8443/catalog/control/main
>> click "Catalog" menuitem in application bar.
>> create new catalog.
>> associated new catalog with "OFBiz E-Commerce Store"
>> create new product category
>> Received the following error message on the page...
>> The Following Errors Occurred:
>> ERROR: Could not complete the Add Category To ProdCatalog 
>> [file:/home/wt5/wteclipse-workspace/ofbiz/applications/product/script/org/ofbiz/product/catalog/CatalogServices.xml#addProductCategoryToProdCatalog]
>>  process [problem creating the newEntity value: Error while inserting: 
>> [GenericEntity:ProdCatalogCategory][createdStamp,2007-11-12 
>> 13:24:12.924(java.sql.Timestamp)][createdTxStamp,2007-11-12 
>> 13:24:12.78(java.sql.Timestamp)][fromDate,2007-11-12 
>> 13:24:12.924(java.sql.Timestamp)][lastUpdatedStamp,2007-11-12 
>> 13:24:12.924(java.sql.Timestamp)][lastUpdatedTxStamp,2007-11-12 
>> 13:24:12.78(java.sql.Timestamp)][prodCatalogCategoryTypeId,PCCT_ADMIN_ALLW(java.lang.String)][prodCatalogId,wt-catalog1-id(java.lang.String)][productCategoryId,wt-catalog1-category1-id(java.lang.String)][sequenceNum,null()][thruDate,null()]
>>  (SQL Exception while executing the following:INSERT INTO 
>> OFBIZ.PROD_CATALOG_CATEGORY (PROD_CATALOG_ID, PRODUCT_CATEGORY_ID, 
>> PROD_CATALOG_CATEGORY_TYPE_ID, FROM_DATE, THR
U_DATE, SEQUENCE_NUM, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, 
CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (A truncation error was 
encountered trying to shrink VARCHAR 'wt-catalog1-category1-id' to length 20.))]
> 

Reply via email to