Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Procedure UpdateCdmJsons is failing because of LockTable in a try function #130

@RonKoppelaar

Description

@RonKoppelaar

When running the tool (at least on BC22.3) its failing on procedure UpdateCdmJsons. This procedure is executed as part of a try function. Below error was found in the eventLog of my local container.

My guess is that the idea behind this lock table is to prevent different background tasks writing simultaneously to the storage account for updating the manifest. But unfortune this lead to below error. Maybe the LockTable inside a try function has changed in recent BC versions? Not sure.

Best option I guess:
Not implementing as TryFunction. This might lead to errors on sync process of a table. But with current implementation it will just keep the error away, and only difference in the output is telemetry not shown.

Steps to reproduce:

  • Create a docker container based on version 22.3NL (Not sure if it really matters, also 21.5 is failing)
  • Install the BC2ADLSE extension
  • Configure the storage account (Container should be empty)
  • Select a table plus all fields
  • Start the export

Table will stay in progress for ever...
Check out the eventlog of the container. Below error is reported.

Running the same repro steps in an Online sandbox will succeed. It looks like Try functions with a Lock table are handled different in cloud compared to Onpremis.

EventLog/Error

Server instance: BC
Tenant ID: default
Environment Name:
Environment Type: Sandbox
Session type: Background
Session ID: 1087
User:
Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNclTryFunctionWriteException
ErrorCode: -1
ShouldCalculateALCallStack: True
SuppressMessage: False
ContainsPersonalOrRestrictedInformation: True
DiagnosticsSuppress: False
DiagnosticsMessage: Message not shown because the NavBaseException constructor was used without privacy classification
MessageWithoutPrivateInformation: Message not shown because the NavBaseException constructor was used without privacy classification
SuppressExceptionCreatedEvent: False
FatalityScope: None
ErrorLevel: Error
ALCallStack:
"ADLSE Communication"(CodeUnit 82562).UpdateCdmJsons line 20 - Azure Data Lake Storage Export by cegeka
"ADLSE Communication"(CodeUnit 82562).TryUpdateCdmJsons line 2 - Azure Data Lake Storage Export by cegeka
"ADLSE Execute"(CodeUnit 82561).OnRun(Trigger) line 82 - Azure Data Lake Storage Export by cegeka

Message: Call to the function 'LOCKTABLE' is not allowed inside the call to 'TryUpdateCdmJsons' when it is used as a TryFunction.
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2146233088
StackTrace:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions