Issue with Recompiling/Updating Database after Deleting Lookup Field

I am having a recurring issue occur in BPM when I delete lookup objects and fields, I have deleted the lookup object “Exchange Rate Lookup” and removed the fields from the pages where they were inserted however the page will not save in setup wizard and gives me this error:

After removing the columns from the Exchange Rate Object, the DB will not modify in Configuration, I get the following error:

At this point there is no lookup object and no lookup fields on any of the other custom objects in the package. Any Ideas as to how to get the update and compile working would be great. 

Thanks

Like 0

Like

5 comments

Hi,

You can check logs to find more detailed error on why db cannot be updated for specified object. Also please note that we do not recommend deleting data from configuration - this can lead to unpredictable issues if they are not deleted correctly. 

Angela Reyes,

Hi, Which Logs in particular? there are several in the file system. Also the package was not deleted from base configuration, but the package and all associations were between a custom object i had created and replacing objects I had also made so none of the changes, including deleting the custom object should affect the base packages.

Vishay Kerai,

You can check Error log file for any details. Base packages are not affected - your custom object cannot be published correctly. This can happen if some data was deleted directly from configuration. 

Angela Reyes,

Yes, i cannot publish the object that is the issue, so is there a solution for this?

I have found the error file, it says the reference schema is deserialised from the metadata. the Schema UId ir refers to is not in the package(checked the UId's of all the other package elements). I have attached the error log file below, how do I go about solving this so the DB can compile sucessfully?

2019-10-23 08:44:44,646 [36] ERROR IIS APPPOOL\BPMOnline Terrasoft LogEmptyReferenceSchema - ReferenceSchema set to null;schemaName: ; referenceSchemaUId: 8d73a1af-df6c-4675-9f55-88c5d242a4fc; IsDeserializedFromMetaData: False; stackTrace: 

   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

   at System.Environment.get_StackTrace()

   at Terrasoft.Core.SchemaProperty.LogEmptyReferenceSchema()

   at Terrasoft.Core.SchemaProperty.get_ReferenceSchema()

   at Terrasoft.Core.Entities.EntitySchemaColumn..ctor(EntitySchemaColumn source)

   at Terrasoft.DB.MSSql.MSSqlMetaScript.CreateColumnIndex(ColumnAction columnAction)

   at Terrasoft.Core.DB.DBMetaScript.AddColumnIndexDeletingActions(DBMetaActionCollection actions, ColumnAction columnAction)

   at Terrasoft.Core.DB.DBMetaScript.AddColumnDeletingActions(DBMetaActionCollection actions, EntitySchema entitySchema, String entitySchemaName, EntitySchemaColumn entitySchemaColumn)

   at Terrasoft.DB.MSSql.MSSqlMetaScript.AddColumnDeletingActions(DBMetaActionCollection actions, EntitySchema entitySchema, String entitySchemaName, EntitySchemaColumn entitySchemaColumn)

   at Terrasoft.Core.DB.DBMetaScript.AddColumnsDeletingActions(DBMetaActionCollection actions, EntitySchemaAction entitySchemaAction)

   at Terrasoft.Core.DB.DBMetaScript.AddEntitySchemaEditingActions(DBMetaActionCollection actions, EntitySchemaAction entitySchemaAction)

   at Terrasoft.DB.MSSql.MSSqlMetaScript.AddEntitySchemaEditingActions(DBMetaActionCollection actions, EntitySchemaAction entitySchemaAction)

   at Terrasoft.DB.MSSql.MSSqlMetaScript.<>c__DisplayClass78_0.<AddEntitySchemaSavingActions>b__0()

   at Terrasoft.Core.DB.DBMetaScript.ExecuteWithDBElementCache(String schemaName, Action action)

   at Terrasoft.DB.MSSql.MSSqlMetaScript.AddEntitySchemaSavingActions(DBMetaActionCollection actions, EntitySchema entitySchema, Boolean saveAdditionalSchemas)

   at Terrasoft.Core.DB.DBMetaScript.AddEntitySchemaWithAdditionalSchemasSavingActions(DBMetaActionCollection actions, EntitySchema entitySchema, Boolean forceUpdateStructure)

   at Terrasoft.Core.Packages.PackageInstallUtilities.AddEntitySchemasSavingActions(DBMetaActionCollection actions, EntitySchema schema, String packageName, Boolean forceUpdateStructure)

   at Terrasoft.Core.Packages.PackageInstallUtilities.InstallSchemasDBStructure(IEnumerable`1 schemaDescriptors, ActionsConfig actionsConfig, Boolean continueIfError, Boolean batchExecute, Boolean forceUpdateStructure, Boolean updateDbStructureOnceForEachSchemaName)

   at Terrasoft.Core.Packages.PackageInstallUtilities.InstallRequiredSchemasDBStructure(Boolean continueIfError)

   at Terrasoft.WebApp.WorkspaceExplorerModule.OnUpdateDBStructureForRequiredMenuItemClick(Object sender, AjaxEventArgs e)

   at Terrasoft.UI.WebControls.Controls.ComponentAjaxEvent.OnEvent(Object sender, AjaxEventArgs e)

   at Terrasoft.UI.WebControls.Controls.ScriptManager.RaisePostBackEvent(String eventArgument)

   at Terrasoft.UI.WebControls.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

   at System.Web.UI.Page.ProcessRequest()

   at System.Web.UI.Page.ProcessRequest(HttpContext context)

   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

   at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)

   at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)

   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)

   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

   at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)

   at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)

   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

 

Vishay Kerai,

Deleting in the configuration section is prohibited at all. Please never do that again. 

As for now, the best solution is rolling back the system from the backup that was made before deleting the column.

Alternatively, try to check the columns in the database. They should match the object columns. Disable logging, if it was enabled for the object. Try to generate source code for all items, then compile all items. Try to update the database structure for the object (in the right-click menu). Check the exception if it appears. 

Show all comments