Unable to Create Risk Threshold in Empty P6 Database (Doc ID 2237338.1)

Last updated on MARCH 07, 2017

Applies to:

Primavera P6 Enterprise Project Portfolio Management - Version 16.2.0.0 to 16.2.0.0 [Release 16.2]
Primavera P6 Enterprise Project Portfolio Management Cloud Service - Version 16.2.0.0 to 16.2.0.0 [Release 16.2]
Information in this document applies to any platform.

Symptoms

While creating risk thresholds, when trying to save the risk threshold by clicking on the save button the system throws an error that says "Unable to Save Changes - Failed saving data! One of the associated objects has been deleted". There are no risk thresholds in the database and it is a new database.


ERROR
-----------------------
Error Unable to save changes.
"Failed saving data. One of the associated objects has been deleted"

The following error is seen from WebAccess log.


Feb-22-2017 02:16:50 312, UTC [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' ERROR /rest/dictionaries/riskScoreTypes (User Id: 25 DB Id: 1) com.primavera.bo.base.LDBEngineImpl ?:? Failed updating values with query: insert into riskscrthr ( riskscrthr.full_name, riskscrthr.probability_value, riskscrthr.scoretype_id, riskscrthr.short_name, riskscrthr.value, riskscrthr.color, riskscrthr.lvl, riskscrthr.threshold_id ) values ( ?, ?, ?, ?, ?, ?, ?, ? ) parms: Very High, 70.0, -30, VH, 70, ffffff, 5, 2
com.primavera.bo.base.IntegrityConstraintException: One of the associated objects has been deleted.
at com.primavera.bo.base.DBEngineImpl.executeUpdate(Unknown Source)
at com.primavera.bo.base.LDBEngineImpl.a(Unknown Source)
at com.primavera.bo.base.LDBEngineImpl.commitTransaction(Unknown Source)
at com.primavera.bo.base.CreateEngineImpl.performFinalization(Unknown Source)
at com.primavera.bo.base.CreateEngineImpl.create(Unknown Source)
at com.primavera.bo.base.server.ServerDAOImpl.create(Unknown Source)
at com.primavera.bo.remotable.ReqMgr.createObjectWithWbsContext(Unknown Source)
at com.primavera.bo.remotable.ReqMgr.createObjectWithWbsContext(Unknown Source)
at com.primavera.bo.remotable.qproxy.ReqMgr.createObjectWithWbsContext(Unknown Source)
at com.primavera.bo.DBReqMgr.createObjectWithWbsContext(Unknown Source)
at com.primavera.bo.base.client.ClientDAOImpl.createWithTransactionAndOptions(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.createUpdateBusinessObjects(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.saveObjectsInternal(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver$1.executeInTransaction(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.executeInNewTransaction(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.saveStore(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.updateStore(Unknown Source)
at com.primavera.rest.service.dictionaries.risks.RiskScoreTypesDictionaryDataHandler.saveData(RiskScoreTypesDictionaryDataHandler.java:249)
at com.primavera.rest.resources.dictionaries.DictionaryCommonResource.save(DictionaryCommonResource.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.NoCacheNoStoreFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.HeaderInserterFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.XSSFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.FrontFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.filters.ApplicationContextInjector.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3431)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3397)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2280)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2196)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1575)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "fk_riskscrthr_type". The conflict occurred in database "PMDB1", table "dbo.RISKSCRTYP", column 'scoretype_id'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)
at com.primavera.infr.db.PPreparedStatement.executeUpdate(Unknown Source)
... 71 more
Original Exception:
com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "fk_riskscrthr_type". The conflict occurred in database "PMDB1", table "dbo.RISKSCRTYP", column 'scoretype_id'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)
at com.primavera.infr.db.PPreparedStatement.executeUpdate(Unknown Source)
at com.primavera.bo.base.DBEngineImpl.executeUpdate(Unknown Source)
at com.primavera.bo.base.LDBEngineImpl.a(Unknown Source)
at com.primavera.bo.base.LDBEngineImpl.commitTransaction(Unknown Source)
at com.primavera.bo.base.CreateEngineImpl.performFinalization(Unknown Source)
at com.primavera.bo.base.CreateEngineImpl.create(Unknown Source)
at com.primavera.bo.base.server.ServerDAOImpl.create(Unknown Source)
at com.primavera.bo.remotable.ReqMgr.createObjectWithWbsContext(Unknown Source)
at com.primavera.bo.remotable.ReqMgr.createObjectWithWbsContext(Unknown Source)
at com.primavera.bo.remotable.qproxy.ReqMgr.createObjectWithWbsContext(Unknown Source)
at com.primavera.bo.DBReqMgr.createObjectWithWbsContext(Unknown Source)
at com.primavera.bo.base.client.ClientDAOImpl.createWithTransactionAndOptions(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.createUpdateBusinessObjects(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.saveObjectsInternal(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver$1.executeInTransaction(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.executeInNewTransaction(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.saveStore(Unknown Source)
at com.primavera.guisupport.common.GenericDataSaver.updateStore(Unknown Source)
at com.primavera.rest.service.dictionaries.risks.RiskScoreTypesDictionaryDataHandler.saveData(RiskScoreTypesDictionaryDataHandler.java:249)
at com.primavera.rest.resources.dictionaries.DictionaryCommonResource.save(DictionaryCommonResource.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.NoCacheNoStoreFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.HeaderInserterFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.XSSFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.FrontFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at com.primavera.pvweb.filters.ApplicationContextInjector.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3431)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3397)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2280)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2196)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1575)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Open P6 EPPM> Open admin tab >Enterprise data > Risk Thresholds
2. Note the event code.

BUSINESS IMPACT
-----------------------
P6 cannot use EPPM risk analysis

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms