Question

Unable to Initialize Mobile App

  • 5 October 2023
  • 15 replies
  • 108 views

Badge +6

Hello Community, 

While initializing Mobile we are facing the below exception.

EXCEPTION Message: SQL logic error duplicate column name: request_id ... Stack Trace: at Metrix.BusinessServer.BusinessPolicies.SharedTablesComponent.MobileManager.GenerateSQLiteMobileSchema(SQLiteConnection theSQLiteDB, StringBuilder& theDelayedSchemaStringBuilder, Dictionary`2 theSyncRuleTableColumnsDictionary) at Metrix.BusinessServer.BusinessPolicies.SharedTablesComponent.MobileManager.CreateMobileDatabase(String personIdIn, String deviceSequenceIn, String messageIn)

 

 

What went wrong here?

either Sync Rules or Metadata..


15 replies

Userlevel 6
Badge +26

Hey @Narsing Rao 

Check if you have a column named request_id on an extension table.

Cheers!

Badge +6

Dear @Shneor Cheshin ,

 

Yes we do have Request Id column in multiple tables.

From which particular table it was pointing i can't define.

 

How to get that info from which table it was pointing the Request Id?

 

Thanks

Userlevel 6
Badge +26

Hey @Narsing Rao 

It is OK to have the same column name on multiple tables.

Specifically, check extension tables. i.e. defined in custom metadata as an extension

Cheers!

Badge +6

Dear @Shneor Cheshin ,

 

 

These are Extension tables we have with Relation Type Extension.
Can we find anything from here?

 

Thanks

Userlevel 6
Badge +26

Hey @Narsing Rao 

Check the tables and see if there is a column named request_id

  • REQUEST_EXTE
  • TASK_EXT
  • PART_NEED_EXT

All baseline tables beside ESCALTION have a column named request_id.

Cheers!

 
Badge +6

Dear @Shneor Cheshin ,

 

Yes we have Request Id column in

  • REQUEST_EXTE
  • PART_NEED_EXT

Extension tables.

Userlevel 6
Badge +26

Hi @Narsing Rao 

Having this field on request_ext makes sense, but not sure about part_need_ext.

Try removing it and re-initialise.

Cheers!

Badge +6

Dear @Shneor Cheshin ,

You mean, dropping the PART_NEED_EXT table and check.

right!

 

Thanks

Userlevel 6
Badge +26

@Narsing Rao 

Also check these fields are marked as ‘Y’

 

Cheers!

Userlevel 6
Badge +26

@Narsing Rao 

Another option is a duplicate column name in the sync rule.

If you have a sync rule that has 2 or more tables and both tables have the same column name, it will cause an issue.

Cheers!

Userlevel 6
Badge +26

Dear @Shneor Cheshin ,

You mean, dropping the PART_NEED_EXT table and check.

right!

 

Thanks

Don’t drop the table.

Change the column name or remove the column.

​​​​​​​++ see other options in previous comments

Cheers!

Badge +6

Dear @Shneor Cheshin ,

 

Yes Understood.

I will remove the column and check.

But there is not Sync Rule with PART_NEED_EXT table.

 

Thanks

Userlevel 6
Badge +26

Dear @Shneor Cheshin ,

 

Yes Understood.

I will remove the column and check.

But there is not Sync Rule with PART_NEED_EXT table.

 

Thanks

 @Narsing Rao 

It is not a sync rule with one of these tables. It can be any table that has this column name.

For example, if you have a sync rule with the task and request table in the same sync rule, Both have a request_id column.

So it will cause a conflict in the sync rule.

Cheers!

Badge +6

Then @Shneor Cheshin ,

 

We need to check sync rules which included with Request Id column.

 

Cheers!

Userlevel 3
Badge +6

If you haven’t found the cause yet, also be sure that you do NOT have any sync rules for Extension tables.  Newer versions of FSM 6 prevent creating them, but upgrading doesn’t remove them.

Reply