[WikiSystems] Unique constraint violation when running on 9.1 and Oracle database

[WikiSystems] Unique constraint violation when running on 9.1 and Oracle database

  
Forge Component
(4)
Published on 5 Feb by J.
4 votes
Published on 5 Feb by J.
Hi,

After installing WikiSystems in our development environment and opening the application I see an "Internal error has occurred and was logged" error message in the browser.

This is running on 9.1.0.20 with an Oracle database.

See below for the error logs from ServiceCenter. Any clues on how to fix this?

ORA-00001: unique constraint (OSADMIN_DEV1.OSIDX_OSUSR_CRX_PAGE1_5TITLE) violated
Environment Information    eSpaceVer: 1 (Id=4328, PubId=4484, CompiledWith=9.1.0.20)
FilePath: d:\Outsystems\Platform Server\running\Wiki.01118551697\HomePage.aspx
Locale: en-US
DateFormat: dd-MM-yyyy
PID: 4936 ('w3wp', Started='4/28/2016 3:39:33 PM', Priv=1365Mb, Virt=10555Mb)
TID: 184
Thread Name:
.NET: 4.0.30319.34209
Stack:
ORA-00001: unique constraint (OSADMIN_DEV1.OSIDX_OSUSR_CRX_PAGE1_5TITLE) violated
   at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
   at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, OracleException& exceptionForArrayBindDML, Boolean isFromEF)
   at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery()
   at OutSystems.HubEdition.Extensibility.Data.ExecutionService.BaseExecutionService.ExecuteNonQuery(IDbCommand cmd)
   at OutSystems.Internal.Db.Command.ExecuteNonQuery(String description, Boolean isApplication, Boolean skipLog, Boolean applyTransformationsToParameters)
   at ssWikiData.ExtendedActions.CreatePage(HeContext heContext, RCPageRecord inParamSource, Int32& outParamId)
   at ssWikiData.Actions.ActionPage_Create(HeContext heContext, ENPageEntityRecord inParamPage, String inParamMarkup, Int32& outParamPageId)
   at ssWikiData.Actions.ActionWikiPageCreateHomepage(HeContext heContext, Int32& outParamPageId)
   at ssWikiData.Actions.ActionGetWikiHomepage(HeContext heContext, Int32& outParamWikiHomepageId)
   at ssWikiData.Actions.ActionGetWikiPageByName(HeContext heContext, String inParamTitle, STWikiPageStructure& outParamWikiPage)
   at ssWiki.RsseSpaceWikiData.MssGetWikiPageByName(HeContext heContext, String inParamTitle, IRecord& outParamWikiPage)
   at ssWiki.Flows.FlowWikiFlow.WBlkWikiPageContent.Preparation(HeContext heContext)
   at ssWiki.Flows.FlowWikiFlow.WBlkWikiPageContent.Page_Load(Object sender, EventArgs e)
   at ssWiki.Flows.FlowWikiFlow.WBlkWikiPageContent.PageStartHook()
   at ASP.blocks_wiki_wikiflow_wikipagecontent_ascx.__DataBind__control2(Object sender, EventArgs e)
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBind()
   at OutSystems.HubEdition.WebWidgets.If.DataBind()
   at OutSystems.HubEdition.WebWidgets.PlaceHolder.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.PlaceHolder.DataBind()
   at OutSystems.HubEdition.WebWidgets.If.DataBind()
   at OutSystems.HubEdition.WebWidgets.PlaceHolder.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.PlaceHolder.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBind()
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBind()
   at OutSystems.HubEdition.WebWidgets.Form.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Body.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSPage.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSPage.DataBind()
   at ssWiki.Flows.FlowWikiFlow.ScrnHomePage.DataBind()
   at ssWiki.Flows.FlowWikiFlow.ScrnHomePage.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
After going into the Wiki module and adding a multilanguage locale (nl-NL) and redeploying, I get somewhat further.

However, the error below props up after logging into the application. It complains about unique index key violations on Page Title, even though I have just installed WikiSystems for the first time, so there shouldn't be any pages yet...

This one I solved by removing the Unique Index on Page Title in the WikiData module. Would this have any negative effects on the operation of the app?

ORA-00001: unique constraint (OSADMIN_DEV1.OSIDX_OSUSR_CRX_PAGE1_5TITLE) violated
   at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
   at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, OracleException& exceptionForArrayBindDML, Boolean isFromEF)
   at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery()
   at OutSystems.HubEdition.Extensibility.Data.ExecutionService.BaseExecutionService.ExecuteNonQuery(IDbCommand cmd)
   at OutSystems.Internal.Db.Command.ExecuteNonQuery(String description, Boolean isApplication, Boolean skipLog, Boolean applyTransformationsToParameters)
   at ssWikiData.ExtendedActions.CreatePage(HeContext heContext, RCPageRecord inParamSource, Int32& outParamId)
   at ssWikiData.Actions.ActionPage_Create(HeContext heContext, ENPageEntityRecord inParamPage, String inParamMarkup, Int32& outParamPageId)
   at ssWikiData.Actions.ActionWikiPageCreateHomepage(HeContext heContext, Int32& outParamPageId)
   at ssWikiData.Actions.ActionGetWikiHomepage(HeContext heContext, Int32& outParamWikiHomepageId)
   at ssWikiData.Actions.ActionGetWikiPageByName(HeContext heContext, String inParamTitle, STWikiPageStructure& outParamWikiPage)
   at ssWiki.RsseSpaceWikiData.MssGetWikiPageByName(HeContext heContext, String inParamTitle, IRecord& outParamWikiPage)
   at ssWiki.Flows.FlowWikiFlow.WBlkWikiPageContent.Preparation(HeContext heContext)
   at ssWiki.Flows.FlowWikiFlow.WBlkWikiPageContent.Page_Load(Object sender, EventArgs e)
   at ssWiki.Flows.FlowWikiFlow.WBlkWikiPageContent.PageStartHook()
   at ASP.blocks_wiki_wikiflow_wikipagecontent_ascx.__DataBind__control2(Object sender, EventArgs e)
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBind()
   at OutSystems.HubEdition.WebWidgets.If.DataBind()
   at OutSystems.HubEdition.WebWidgets.PlaceHolder.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.PlaceHolder.DataBind()
   at OutSystems.HubEdition.WebWidgets.If.DataBind()
   at OutSystems.HubEdition.WebWidgets.PlaceHolder.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.PlaceHolder.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBind()
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.Container.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Container.DataBind()
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSUserControl.DataBind()
   at OutSystems.HubEdition.WebWidgets.Form.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.Body.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSPage.DataBindChildren()
   at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
   at OutSystems.HubEdition.WebWidgets.OSPage.DataBind()
   at ssWiki.Flows.FlowWikiFlow.ScrnHomePage.DataBind()
   at ssWiki.Flows.FlowWikiFlow.ScrnHomePage.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



Hi Shanny,

Please check table definitions of your Oracle database. You are trying to insert duplicate values into the table where unique key constraint is applied.

Alternatively check if there are any triggers on tables which are populating values when inserting any records. You may be trying to assign values to the fields which gets values from the triggers.

Thanks and Regards,
Suraj Borade
Hi Suraj,

I understand that there are unique constraints on the entities. My point is that these are violated as soon as I've installed WikiSystems, and only related to those entities. I have not created any table definitions, triggers or entities myself.

Therefore I am looking for an answer from the WikiSystems developer how to fix this.
Did you run the defaultwiki-timer?



After running the defaultwiki-timer it works, but only when I add a multilanguage locale to the Wiki module. Otherwise I still get the first internal error message.