When trying to create an API thru CA Portal 4.2.3 which has an Gateway enrolled with it, although the API is created successfully, the deployment page always shows "Error".
In this case, it's due to the folder 'Portal APIs' was deleted.
Error message in ssg log,
SEVERE 152 org.hibernate.util.JDBCExceptionReporter: Cannot add or update a child row: a foreign key constraint fails (`ssg`.`policy`, CONSTRAINT `policy_folder` FOREIGN KEY (`folder_goid`) REFERENCES `folder` (`goid`) ON DELETE NO ACTION ON UPDATE NO ACTION)
CA API Developer Portal version 4.2.3,
CA API Gateway v9.2.00-CR09
1. Take a snapshot, or backup ssg database before change
2. Run following sql on ssg database to add the folder back,
INSERT INTO `folder` VALUES (x'DDB84C6F397D7DBD3CCA71D3043F019C',0,'Portal APIs',x'0000000000000000FFFFFFFFFFFFEC76',NULL);
'DDB84C6F397D7DBD3CCA71D3043F019C' is the folder id of 'Portal APIs' folder, it must be the same as cluster wide property "portal.api.folder".
'0000000000000000FFFFFFFFFFFFEC76' is the folder id of Root folder -- the parent folder of 'Portal APIs' folder.
3. Restart gateway to take effect.
service ssg restart