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 -- View this message in context: http://ofbiz.135035.n4.nabble.com/Cannot-add-sub-catorgories-or-new-front-end-user-tp4095310p4102833.html Sent from the OFBiz - User mailing list archive at Nabble.com.
