Cannot add sub catorgories or new front end user

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot add sub catorgories or new front end user

Nick Holland
Hello,
Ive just installed ofbiz 9.04.1 on a centOs server, and when im trying
to add a category under an existing one, i get the following error:

The Following Errors Occurred:

ERROR: Could not complete the Create an ProductCategory
[file:/usr/share/apache-ofbiz-09.04.01/applications/product/script/org/ofbiz/product/category/CategoryServices.xml#createProductCategory] process [problem creating the newEntity value: Error while inserting: [GenericEntity:ProductCategory][categoryImageUrl,null()][categoryName,test(java.lang.String)][createdStamp,2011-11-22 04:27:50.79(java.sql.Timestamp)][createdTxStamp,2011-11-22 04:27:50.761(java.sql.Timestamp)][description,test(java.lang.String)][detailScreen,null()][lastUpdatedStamp,2011-11-22 04:27:50.79(java.sql.Timestamp)][lastUpdatedTxStamp,2011-11-22 04:27:50.761(java.sql.Timestamp)][linkOneImageUrl,null()][linkTwoImageUrl,null()][primaryParentCategoryId,TestCatalog(java.lang.String)][productCategoryId,TEST(java.lang.String)][productCategoryTypeId,CATALOG_CATEGORY(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY' caused a violation of foreign key constraint 'PROD_CTGRY_PARENT' for key (TestCatalog). The statement has been rolled back.))]

I apoligise if this is a simple error, but I am new to this. I suspect
it is problems with the Derby database permissions, however Im not sure
how to set these.

Any ideas?

Nick


Reply | Threaded
Open this post in threaded view
|

Re: Cannot add sub catorgories or new front end user

Jacques Le Roux
Administrator
Can you reproduce on stable demo? (To check 1st if ever it's a regression)
https://demo-old.ofbiz.apache.org/catalog/control/main?USERNAME=flexadmin&PASSWORD=ofbiz&JavaScriptEnabled=Y

Jacques

From: "Nick Holland" <[hidden email]>

> Hello,
> Ive just installed ofbiz 9.04.1 on a centOs server, and when im trying
> to add a category under an existing one, i get the following error:
>
> The Following Errors Occurred:
>
> ERROR: Could not complete the Create an ProductCategory
> [file:/usr/share/apache-ofbiz-09.04.01/applications/product/script/org/ofbiz/product/category/CategoryServices.xml#createProductCategory]
> process [problem creating the newEntity value: Error while inserting:
> [GenericEntity:ProductCategory][categoryImageUrl,null()][categoryName,test(java.lang.String)][createdStamp,2011-11-22
> 04:27:50.79(java.sql.Timestamp)][createdTxStamp,2011-11-22
> 04:27:50.761(java.sql.Timestamp)][description,test(java.lang.String)][detailScreen,null()][lastUpdatedStamp,2011-11-22
> 04:27:50.79(java.sql.Timestamp)][lastUpdatedTxStamp,2011-11-22
> 04:27:50.761(java.sql.Timestamp)][linkOneImageUrl,null()][linkTwoImageUrl,null()][primaryParentCategoryId,TestCatalog(java.lang.String)][productCategoryId,TEST(java.lang.String)][productCategoryTypeId,CATALOG_CATEGORY(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO OFBIZ.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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY' caused a violation of foreign key
> constraint 'PROD_CTGRY_PARENT' for key (TestCatalog). The statement has been rolled back.))]
>
> I apoligise if this is a simple error, but I am new to this. I suspect
> it is problems with the Derby database permissions, however Im not sure
> how to set these.
>
> Any ideas?
>
> Nick
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Cannot add sub catorgories or new front end user

Paul Foxworthy
In reply to this post by Nick Holland
Nick Holland wrote
Hello,
Ive just installed ofbiz 9.04.1 on a centOs server, and when im trying
to add a category under an existing one, i get the following error:

The Following Errors Occurred:

ERROR: Could not complete the Create an ProductCategory
[file:/usr/share/apache-ofbiz-09.04.01/applications/product/script/org/ofbiz/product/category/CategoryServices.xml#createProductCategory] process [problem creating the newEntity value: Error while inserting: [GenericEntity:ProductCategory][categoryImageUrl,null()][categoryName,test(java.lang.String)][createdStamp,2011-11-22 04:27:50.79(java.sql.Timestamp)][createdTxStamp,2011-11-22 04:27:50.761(java.sql.Timestamp)][description,test(java.lang.String)][detailScreen,null()][lastUpdatedStamp,2011-11-22 04:27:50.79(java.sql.Timestamp)][lastUpdatedTxStamp,2011-11-22 04:27:50.761(java.sql.Timestamp)][linkOneImageUrl,null()][linkTwoImageUrl,null()][primaryParentCategoryId,TestCatalog(java.lang.String)][productCategoryId,TEST(java.lang.String)][productCategoryTypeId,CATALOG_CATEGORY(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY' caused a violation of foreign key constraint 'PROD_CTGRY_PARENT' for key (TestCatalog). The statement has been rolled back.))]

I apoligise if this is a simple error, but I am new to this. I suspect
it is problems with the Derby database permissions, however Im not sure
how to set these.

Any ideas?

Nick
Hi Nick,

I think you don't have a ProductCategory with an ID of TestCatalog, and therefore you can't use that as a parent for the test ProductCategory. Either create TestCatalog first, or don't set a parent at all.

Cheers

Paul Foxworthy


--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/