NMBRS werkt niet meer in versie 20.1.499: NullReferenceException

Bij het openen van NMBRS krijg ik de melding:

itgenclr000
Een verbinding met de database ‘Visma\NMBRS’ kon niet worden opgebouwd als gebruiker ‘-------’.

De volledige melding:

The database 'Visma - NMBRS' could not be opened.

Object reference not set to an instance of an object.

Bericht ID: 0014644c-90e6-42d2-b723-3d5cac8d8998

Opgetreden (UTC): 7/23/2021 12:12:23 PM

System.NullReferenceException
ValidationException
ValidationException
   at Invantive.Data.Providers.Nmbrs.NmbrsNlProvider.OnAfterOpen(GlobalState owner, ExecutionOptions executionOptions)
   at Invantive.Data.GenericConnectionDataProvider.Open(GlobalState owner, ExecutionOptions executionOptions, SerializableDatabase database, DataContainer dataContainer, Credentials credentials, Boolean ignoreDecryptionErrors, Boolean& decryptionErrorsOccurred)
   at Invantive.Data.ConnectionManager.SU(GlobalState , ExecutionOptions , IConnectionDataProvider , SerializableDatabase , DataContainer , Credentials , Boolean , Boolean& )

Met de voorgaande versie 20.1.435 lukte aanmelden en ophalen wel.

De gebruiker heeft te weinig rechten: de debtor kan niet gelezen worden uit NMBRS.

In de volgende 20.1 zal voortaan dan de data container ID ingesteld worden eindigend op “unknown” in plaats van het debtor ID.

Voor nu kan overwogen worden om de gebruikte NMBRS user leesrechten te geven op tenminste 1 NMBRS debtor.

Nmbrs v1 vraagt de volgende parameters bij de endpoint PayslipsV2ByCompanyRunAndYear:

Nmbrs.Company.PayslipsV2ByCompanyRunAndYear@nms(:RunId :intyear)

Nmbrs v2 vraagt de volgende parameters bij de endpoint PayslipsV2ByCompanyRunAndYear:

Nmbrs.Company.PayslipsV2ByCompanyRunAndYear@nms(:CompanyId, :RunId :intyear)

Door upgrade naar 20.1.502 kan je niet de CompanyId paramenter toevoegen.

De company ID is te achterhalen via:

select cpy.id
from   companies cpy

Welke query wordt precies gebruikt waardoor het niet lukt?

Ik maak gebruik van de NMBS verbinding met in de settings:

connectionString="revert-to-v1=false"

De query is:

select CompanyRuns.company_code
,      xml.*
from   CompanyRuns@inmemorystorage CompanyRuns
left 
outer 
join   Nmbrs.Company.PayslipsV2ByCompanyRunAndYear@nms
       ( CompanyId => CompanyRuns.company_code
       , RunId     => CompanyRuns.id
       , intyear   => CompanyRuns.year
       ) 
       PayslipsV2ByCompanyRunAndYear
join   xmltable
       ( '/payslips/payslip[*]'
         passing  PayslipsV2ByCompanyRunAndYear.value
         columns  employeeid   varchar2 path './employeeid'
         ,        employeename varchar2 path './employeename',
         ,        period       varchar2 path './period',
         ,        year         varchar2 path './year',
         ,        run          varchar2 path './run'
       ) xml

De volgende foutmelding treedt op:

itgenttn290: itgen_sql_ttn290_user_message_par2 (COMPANYID) (Nmbrs.Company.PayslipsV2ByCompanyRunAndYear).

Bericht ID: 9c12eb4b-096d-47dd-88f4-e1259e69e76a

Opgetreden (UTC): 7/27/2021 8:11:44 AM

...query...

ValidationException
   at Invantive.Basics.ValidationException..ctor(GlobalState owner, ExecutionOptions executionOptions, String messageCode, String messageText, String kindRequest, String localStackTrace, String nk, Exception innerException, Boolean inheritMessageCodeWhenPresent, Nullable`1 uid, Boolean isRecoverable, String poolIdentityId)
   at Invantive.Sql.V1.TransformToExpression.GetNumberedOrNamedExpressions(GlobalState owner, ExecutionOptions executionOptions, NumberedOrNamedExpressionListContext ctx, ExpressionParser expressionParser, String tableOrFunctionName, List`1 tableFunctionParametersByPosition)
   at Invantive.Sql.V1.DataSourceOrFunctionTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.SelectStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.DdlStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.QueryPlan.ForcePlan(GlobalState owner, ExecutionOptions executionOptions)
   at Invantive.Sql.V1.QueryPlan.Fetch(GlobalState owner, ExecutionOptions executionOptions, ObjectDefinition objectDefinition, String sqlStatement)
   at Invantive.Data.ConnectionManager.LJ.M(QueryPlan )
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Invantive.Data.ConnectionManager.ExecuteAndCombineQueryPlansV1(GlobalState owner, ExecutionOptions executionOptions, QueryPlan[] queryPlans, String sqlStatement, ParameterList parameters)
   at Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)
   at Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)
   at Invantive.Data.ActionProceduresBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters)
   at Invantive.Producer.Windows.Forms.QueryToolResults.KXO(GlobalState , ExecutionOptions , IProgressNotifier , String , ParameterList , Boolean , Boolean , Boolean , Boolean )
   at Invantive.Producer.Windows.Forms.QueryToolResults.HXO(GlobalState , ExecutionOptions , String , ParameterList )
   at Invantive.Producer.Windows.Forms.QueryToolResults.RC.Z()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
   at Invantive.Sql.V1.TransformToExpression.GetNumberedOrNamedExpressions(GlobalState owner, ExecutionOptions executionOptions, NumberedOrNamedExpressionListContext ctx, ExpressionParser expressionParser, String tableOrFunctionName, List`1 tableFunctionParametersByPosition)
   at Invantive.Sql.V1.DataSourceOrFunctionTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.SelectStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.DdlStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser)
   at Invantive.Sql.V1.QueryPlan.ForcePlan(GlobalState owner, ExecutionOptions executionOptions)
   at Invantive.Sql.V1.QueryPlan.Fetch(GlobalState owner, ExecutionOptions executionOptions, ObjectDefinition objectDefinition, String sqlStatement)
   at Invantive.Data.ConnectionManager.LJ.M(QueryPlan )
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Invantive.Data.ConnectionManager.ExecuteAndCombineQueryPlansV1(GlobalState owner, ExecutionOptions executionOptions, QueryPlan[] queryPlans, String sqlStatement, ParameterList parameters)
   at Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)
   at Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)
   at Invantive.Data.ActionProceduresBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters)
   at Invantive.Producer.Windows.Forms.QueryToolResults.KXO(GlobalState , ExecutionOptions , IProgressNotifier , String , ParameterList , Boolean , Boolean , Boolean , Boolean ) in C:\Users\gle3.WS212\Documents\ws-master\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolTraceViewModel.cs:line 17
   at Invantive.Producer.Windows.Forms.QueryToolResults.HXO(GlobalState , ExecutionOptions , String , ParameterList ) in C:\Users\gle3.WS212\Documents\ws-master\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolDbmsOutputViewModel.cs:line 126

De juiste tekst bij de foutmelding ontbreekt door een bug. Dit had moeten zijn:

You have provided a parameter with name ‘COMPANYID’, but there is no parameter with that name in ‘Nmbrs.Company.PayslipsV2ByCompanyRunAndYear’.

Wat is de uitkomst van de volgende query op deze NMBRS database:

select value
,      default_value
from   systemdatacontainerattributes@datadictionary
where  provider_name = 'NmbrsNl'
and    code          = 'revert-to-v1'

In beide kolommen krijg ik “FALSE” als resultaat terug