27
Views
3
Comments
[Discovery] after changing the environment domain I can't use the app or create new snapshoot
discovery
Web icon
Forge asset by Architecture Team
Application Type
Reactive

after changing the environment domain I can't use the app or create new snapshoot 
and we found this error in the service center logs 

[1] Error executing query.

   at ssDiscoveryProbe.Actions.FuncActionModules_Reload.QueryCreateModuleDefinitionsForExtensions2(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount, Int32 qpinLibModuleLayerId)

   at ssDiscoveryProbe.Actions.ActionModules_Reload(HeContext heContext, String inParamDatabaseProvider)

   at ssDiscoveryProbe.Actions.ActionApplications_Reload(HeContext heContext, String inParamDatabaseProvider)

   at ssDiscoveryProbe.Actions.ActionSnapShot_Create(HeContext heContext, Int32& outParamSnapShotId, String& outParamSnapShotName)


[2] Error in advanced query CreateModuleDefinitionsForExtensions2 in Modules_Reload in DiscoveryProbe (INSERT INTO {ModuleDef}(Name, Description, SS_Key, Kind, ApplicationDefId, ESpaceId, ExtensionId, Layer, IsSelected, IsDeleted)  SELECT    E.[Name],   EV.[Description],   E.[SS_Key],   'xif' as Kind,   AD.[Id] as ApplicationDefId,   NULL as ESpaceId,   E.[Id] as ExtensionId,   @LibModuleLayerId as Layer,  1 as IsSelected,  0 as IsDeleted  FROM (((({Extension_Version} EV      Inner JOIN {Extension} E ON (E.[VERSION_ID] = EV.[ID]))       Inner JOIN ({Module} M      Inner JOIN {App_Definition_Module} ADM ON (ADM.[MODULE_ID] = M.[ID])) ON (M.[EXTENSION_ID] = E.[ID]))       Inner JOIN {ApplicationDef} AD ON (ADM.[APPLICATION_ID] = AD.[APPLICATIONID]))       Left JOIN {ModuleDef} MD ON (MD.[EXTENSIONID] = E.[ID]))   WHERE (E.[IS_ACTIVE] = 1) AND (AD.[ISDELETED] <> 1) AND (MD.[ID] IS NULL)): The INSERT statement conflicted with the FOREIGN KEY constraint ""OSFRK_OSUSR_MRN_MODULEDEF_OSUSR_MRN_MODULELAYER_LAYER"". The conflict occurred in database ""outsystems_DEV"", table ""dbo.OSUSR_MRN_MODULELAYER"", column 'ID'.

The statement has been terminated.

ErrorLog (3).xlsx
2025-09-25 14-38-22
Lokesh Kumar Yadav

After changing the environment domain, we are no longer able to use the application or create a new snapshot.


We found the following error in the Service Center logs:


The issue seems to occur during the execution of ActionSnapShot_Create, specifically while running the query CreateModuleDefinitionsForExtensions2.


The main error is:


The INSERT statement conflicted with the FOREIGN KEY constraint "OSFRK_OSUSR_MRN_MODULEDEF_OSUSR_MRN_MODULELAYER_LAYER".


It appears that the system is trying to insert a record into ModuleDef with a Layer value that does not exist in the OSUSR_MRN_MODULELAYER table.


Could you please check whether some Module Layer records are missing or corrupted after the environment domain change?


Because of this issue, we are unable to create snapshots or use the application properly.

2017-12-12 15-22-01
Rui Madaleno
Staff

Can you show us the current contents of Module Layer ?

Please note that Discovery uses the domain name internally (the snapshot contains the domain name) and changing the domain name is not supported. 





UserImage.jpg
Ricardo Marques

Hi Lokesh Kumar Yadav,

As Rui mentioned, please follow this menu option:

Best Regards,

ROM

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.