I recently came across an issue on a client site and on the Project Server forums with creating a new Portfolio Analysis, clicking the new button threw the error below:
In the ULS logs the following lines were key to resolving the issue:
Exception occurred in method Microsoft.Office.Project.Server.BusinessLayer.LookupTable.ReadLookupTablesMultiLang System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. at System.Data.DataSet.EnableConstraints() at System.Data.DataSet.set_EnforceConstraints(Boolean value) at Microsoft.Office.Project.Server.DataAccessLayer.DAL.SubDal.FillTypedDataSet(Boolean allowCache, DataSet typedDataSet, String[] tables, SqlCommand sqlCommand, Boolean enforceConstraints) at Microsoft.Office.Project.Server.DataAccessLayer.LookupTableDal.ReadLookupTables() at Microsoft.Office.Project.Server.BusinessLayer.LookupTable.ReadLookupTablesMultiLang(String xmlFilter, Boolean autoCheckOut) at Microsoft.Office.Project.Server.Wcf.Implementation.LookupTableImpl.ReadLookupTablesMultiLang
System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=GeneralUnhandledException Instructions: Pass this into PSClientError constructore to access all error information at Microsoft.Office.Project.Server.WebServiceProxy.LookupTable.ReadLookupTablesMultiLang(String xmlFilter, Boolean autoCheckOut) at Microsoft.Office.Project.PWA.ApplicationPages.OptimizerCreateAnalysisPage.FillForcedLookupTables() at Microsoft.Office.Project.PWA.ApplicationPages.OptimizerCreateAnalysisPage.FillControls() at Microsoft.Office.Project.PWA.ApplicationPages.OptimizerCreateAnalysisPage.PJWebPage_OnLoad(EventArgs e) at Microsoft.Office.Project.PWA.PJWebPage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolea… e5a9e8ca-2a63-494a-a996-bb6c5704171a
05/09/2012 09:24:26.03* w3wp.exe (0x2028) 0x0190 Project Server Project Web App 2q1k Exception …n includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
This system was originally migrated from Project Server 2003, to Project Server 2007 then to Project Server 2010. During the migration from Project Server 2003 to Project Server 2007 there was an issue updating the multi language lookup tables, the fix is very simple and documented here:
http://technet.microsoft.com/en-us/library/cc197573(v=office.12).aspx#section9
Hopefully that will help others who come across this issue.