You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Tim Stoel <ti...@paserv.com> on 2011/08/12 21:06:41 UTC

"Data too long for column" errors

I am getting this ³Data too long for column² error when adding a category. I
tried using only one character and still get this error.  Am I making
another parameter too long?  I am using 11.04 downloaded via SVN on
MySQL/CentOS.  The full error reads:

Error: ERROR: Could not complete the Create an ProductCategory
[file:/opt/release11.04/applications/product/script/org/ofbiz/product/catego
ry/CategoryServices.xml#createProductCategory] process [problem creating the
newEntity value: Error while inserting:
[GenericEntity:ProductCategory][categoryName,ABC-CATALOG
Promotions(java.lang.String)][createdStamp,2011-08-12
12:04:54.739(java.sql.Timestamp)][createdTxStamp,2011-08-12
12:04:54.69(java.sql.Timestamp)][detailScreen,component://ecommerce/widget/C
atalogScreens.xml#categorydetailmatrix(java.lang.String)][lastUpdatedStamp,2
011-08-12 12:04:54.739(java.sql.Timestamp)][lastUpdatedTxStamp,2011-08-12
12:04:54.69(java.sql.Timestamp)][productCategoryId,ABC-CATALOG_PROMOTIONS(ja
va.lang.String)][productCategoryTypeId,CATALOG_CATEGORY(java.lang.String)]
(SQL Exception while executing the following:INSERT INTO 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Data truncation: Data
too long for column 'PRODUCT_CATEGORY_ID' at row 1))]  calling service
createProductCategory in createProductCategoryAndAddToProdCatalog

Thanks,
Tim

Re: "Data too long for column" errors

Posted by Tim Stoel <ti...@paserv.com>.
Thanks for the tip Stephen, I found that the setup wizard has no safeguard
against creating this situation, if you make the catalog ID longer than ten
characters, when “_PROMOTIONS” gets tacked on the end, it is too long.
Then, you are unable to go back and change the ID of the catalog, so I just
ran ./and clean-all and started over again, using 001 for IDs of the
catalog, store, website, etc, and it worked fine.

Tim



From: Stephen Rufle <sr...@salmonllc.com>
Organization: Salmon LLC
Reply-To: <sr...@salmonllc.com>
Date: Fri, 12 Aug 2011 12:21:59 -0700
To: <us...@ofbiz.apache.org>
Cc: Tim Stoel <ti...@paserv.com>
Subject: Re: "Data too long for column" errors

   
ABC-CATALOG_PROMOTIONS is greater then the default 20 chars
 
 
 On 8/12/2011 12:06 PM, Tim Stoel wrote:
>  
> I am getting this ³Data too long for column² error when adding a category. I
> tried using only one character and still get this error.  Am I making
> another parameter too long?  I am using 11.04 downloaded via SVN on
> MySQL/CentOS.  The full error reads:
> 
> Error: ERROR: Could not complete the Create an ProductCategory
> [file:/opt/release11.04/applications/product/script/org/ofbiz/product/catego
> ry/CategoryServices.xml#createProductCategory] process [problem creating the
> newEntity value: Error while inserting:
> [GenericEntity:ProductCategory][categoryName,ABC-CATALOG
> Promotions(java.lang.String)][createdStamp,2011-08-12
> 12:04:54.739(java.sql.Timestamp)][createdTxStamp,2011-08-12
> 12:04:54.69(java.sql.Timestamp)][detailScreen,component://ecommerce/widget/C
> atalogScreens.xml#categorydetailmatrix(java.lang.String)][lastUpdatedStamp,2
> 011-08-12 12:04:54.739(java.sql.Timestamp)][lastUpdatedTxStamp,2011-08-12
> 12:04:54.69(java.sql.Timestamp)][productCategoryId,ABC-CATALOG_PROMOTIONS(ja
> va.lang.String)][productCategoryTypeId,CATALOG_CATEGORY(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Data truncation: Data
> too long for column 'PRODUCT_CATEGORY_ID' at row 1))]  calling service
> createProductCategory in createProductCategoryAndAddToProdCatalog
> 
> Thanks,
> Tim
> 
>  
>  
>  
> -- 
> Stephen P Rufle
> srufle@salmonllc.com
> O:480-626-8022
> Yahoo IM: stephen_rufle
> AOL IM: stephen1rufle
>  


Re: "Data too long for column" errors

Posted by Stephen Rufle <sr...@salmonllc.com>.
ABC-CATALOG_PROMOTIONS is greater then the default 20 chars



On 8/12/2011 12:06 PM, Tim Stoel wrote:
> I am getting this ³Data too long for column² error when adding a category. I
> tried using only one character and still get this error.  Am I making
> another parameter too long?  I am using 11.04 downloaded via SVN on
> MySQL/CentOS.  The full error reads:
>
> Error: ERROR: Could not complete the Create an ProductCategory
> [file:/opt/release11.04/applications/product/script/org/ofbiz/product/catego
> ry/CategoryServices.xml#createProductCategory] process [problem creating the
> newEntity value: Error while inserting:
> [GenericEntity:ProductCategory][categoryName,ABC-CATALOG
> Promotions(java.lang.String)][createdStamp,2011-08-12
> 12:04:54.739(java.sql.Timestamp)][createdTxStamp,2011-08-12
> 12:04:54.69(java.sql.Timestamp)][detailScreen,component://ecommerce/widget/C
> atalogScreens.xml#categorydetailmatrix(java.lang.String)][lastUpdatedStamp,2
> 011-08-12 12:04:54.739(java.sql.Timestamp)][lastUpdatedTxStamp,2011-08-12
> 12:04:54.69(java.sql.Timestamp)][productCategoryId,ABC-CATALOG_PROMOTIONS(ja
> va.lang.String)][productCategoryTypeId,CATALOG_CATEGORY(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Data truncation: Data
> too long for column 'PRODUCT_CATEGORY_ID' at row 1))]  calling service
> createProductCategory in createProductCategoryAndAddToProdCatalog
>
> Thanks,
> Tim
>

-- 
Stephen P Rufle
srufle@salmonllc.com
O:480-626-8022
Yahoo IM: stephen_rufle
AOL IM: stephen1rufle