Il messaggio di errore completo è
ValidationException
Invantive.Basics.InvantiveSqlException
at Invantive.Basics.ValidationException..ctor(GlobalState owner, ExecutionOptions executionOptions, String messageCode, String errorMessage, String kindRequest, String localStackTrace, String nk, Exception innerException, Boolean inheritMessageCodeWhenPresent, Nullable`1 uid, Nullable`1 isRecoverable, String poolIdentityId, String url, Nullable`1 partyUid, String partitionCode, String tableName, String parameter1, String parameter2, String parameter3, String parameter4, String parameter5, String clientId)
at Invantive.Sql.V1.SqlSymbolTable.ThrowMissingSymbol(GlobalState owner, ExecutionOptions executionOptions, String alias, String name)
at Invantive.Sql.V1.SqlSymbolTable.GetSymbol(GlobalState owner, ExecutionOptions executionOptions, String alias, String name)
at Invantive.Sql.V1.ExpressionParser.LookupSymbol(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, String alias, String name)
at Invantive.Sql.V1.TransformToExpression.GetExpressionForField(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, ParserRuleContext context, String alias, String fieldName, Type& type, Nullable`1& isNullExpression, Boolean& isPSqlParameter, DatabaseColumn& field)
at Invantive.Sql.V1.TransformToExpression.VisitFieldIdentifier(FieldIdentifierContext context)
at Invantive.Sql.V1.TransformToExpression.VisitExpression(ExpressionContext context)
at Invantive.Sql.V1.TransformToExpression.ParseExpression(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IParseTree tree, Type& expressionType, Boolean& isConstant, Object& data, Nullable`1& isNullable, Boolean& usesFields, DatabaseColumn[]& fieldsUsed)
at Invantive.Sql.V1.ExpressionParser.ParseExpression(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IProviderManager manager, SqlEngine sqlEngine, IParseTree expression)
at Invantive.Sql.V1.SelectStatementTree.GetProjectionMetadata(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, List`1 selectList, ExpressionParser exprParser)
at Invantive.Sql.V1.SelectStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, SparseArrayPool sparseArrayPool, ParameterList parameters, QueryObject additionalFilters, ExpressionParser expressionParser, IQueryStatePerExecution queryStatePerExecution)
at Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, ParameterList parameters, QueryObject additionalFilters, ExpressionParser expressionParser, IQueryStatePerExecution queryStatePerExecution)
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.CreateValue()
at Invantive.Sql.V1.QueryPlan.ForcePlan(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep)
at Invantive.Sql.V1.QueryPlan.GetFields(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep)
at Invantive.Data.DataDictionaryProvider.A(GlobalState, ExecutionOptions, SqlExecutionStep sqlExecutionStep, ObjectDefinition, SqlViewSpec)
at Invantive.Data.DataDictionaryProvider.<>c__DisplayClass308_0.<RegisterDataContainerMetadata>b__0(GlobalState, ExecutionOptions, SqlExecutionStep _sqlExecutionStep, ObjectDefinition)
at Invantive.Data.ViewObjectDefinition.GetFields(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep)
at Invantive.Cloud.Shared.ODataEdmUtility.A(GlobalState, ExecutionOptions, SqlExecutionStep sqlExecutionStep, IProviderManager, EdmModelCacheEntity, ObjectDefinition, DataContainerMetadata, Int32, Boolean)
at Invantive.Cloud.Shared.ODataEdmUtility.A(GlobalState, ExecutionOptions, SqlExecutionStep sqlExecutionStep, IProviderManager, DataContainerMetadata, PartitionInfo partitionInfo, ObjectDefinition, EdmModelCache, DataContainerConnectionInfo dataContainerConnectionInfo, String, Int32, Boolean, Int32&, Int32&, Int32&, Int32&)
at Invantive.Cloud.Shared.ODataEdmUtility.<>c__DisplayClass10_0.<ConstructNewDatabaseEdmModel>b__2(<>f__AnonymousType0`4, ParallelLoopState parallelLoopState, Int64)
at Invantive.Basics.ParallelUtility.<>c__DisplayClass4_0`1.<ForEachWithAggregatedExceptions>b__0(TSource tSource, ParallelLoopState parallelLoopState, Int64 index)
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
at Invantive.Sql.V1.SqlSymbolTable.ThrowMissingSymbol(GlobalState owner, ExecutionOptions executionOptions, String alias, String name)
at Invantive.Sql.V1.SqlSymbolTable.GetSymbol(GlobalState owner, ExecutionOptions executionOptions, String alias, String name)
at Invantive.Sql.V1.ExpressionParser.LookupSymbol(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, String alias, String name)
at Invantive.Sql.V1.TransformToExpression.GetExpressionForField(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, ParserRuleContext context, String alias, String fieldName, Type& type, Nullable`1& isNullExpression, Boolean& isPSqlParameter, DatabaseColumn& field)
at Invantive.Sql.V1.TransformToExpression.VisitFieldIdentifier(FieldIdentifierContext context)
at Invantive.Sql.V1.TransformToExpression.VisitExpression(ExpressionContext context)
at Invantive.Sql.V1.TransformToExpression.ParseExpression(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IParseTree tree, Type& expressionType, Boolean& isConstant, Object& data, Nullable`1& isNullable, Boolean& usesFields, DatabaseColumn[]& fieldsUsed)
at Invantive.Sql.V1.ExpressionParser.ParseExpression(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IProviderManager manager, SqlEngine sqlEngine, IParseTree expression)
at Invantive.Sql.V1.SelectStatementTree.GetProjectionMetadata(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, List`1 selectList, ExpressionParser exprParser)
at Invantive.Sql.V1.SelectStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, SparseArrayPool sparseArrayPool, ParameterList parameters, QueryObject additionalFilters, ExpressionParser expressionParser, IQueryStatePerExecution queryStatePerExecution)
at Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, ParameterList parameters, QueryObject additionalFilters, ExpressionParser expressionParser, IQueryStatePerExecution queryStatePerExecution)
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.CreateValue()
at Invantive.Sql.V1.QueryPlan.ForcePlan(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep)
at Invantive.Sql.V1.QueryPlan.GetFields(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep)
at Invantive.Data.DataDictionaryProvider.A(GlobalState, ExecutionOptions, SqlExecutionStep sqlExecutionStep, ObjectDefinition, SqlViewSpec)
at Invantive.Data.DataDictionaryProvider.<>c__DisplayClass308_0.<RegisterDataContainerMetadata>b__0(GlobalState, ExecutionOptions, SqlExecutionStep _sqlExecutionStep, ObjectDefinition)
at Invantive.Data.ViewObjectDefinition.GetFields(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep)
at Invantive.Cloud.Shared.ODataEdmUtility.A(GlobalState, ExecutionOptions, SqlExecutionStep sqlExecutionStep, IProviderManager, EdmModelCacheEntity, ObjectDefinition, DataContainerMetadata, Int32, Boolean)
at Invantive.Cloud.Shared.ODataEdmUtility.A(GlobalState, ExecutionOptions, SqlExecutionStep sqlExecutionStep, IProviderManager, DataContainerMetadata, PartitionInfo partitionInfo, ObjectDefinition, EdmModelCache, DataContainerConnectionInfo dataContainerConnectionInfo, String, Int32, Boolean, Int32&, Int32&, Int32&, Int32&)
at Invantive.Cloud.Shared.ODataEdmUtility.<>c__DisplayClass10_0.<ConstructNewDatabaseEdmModel>b__2(<>f__AnonymousType0`4, ParallelLoopState parallelLoopState, Int64)
presso Invantive.Basics.ParallelUtility.<>c__DisplayClass4_0`1.<ForEachWithAgggatedExceptions>b__0(TSource tSource, ParallelLoopState parallelLoopState, Int64 index)
--- Fine del trace dello stack dalla posizione precedente ---
at Invantive.Basics.ErrorConstants.ThrowOneOrMoreExceptions(GlobalState owner, ExecutionOptions executionOptions, IEnumerable`1 exceptions)
at Invantive.Basics.ParallelUtility.ForEachWithAggregatedExceptions[TSource](GlobalState owner, ExecutionOptions executionOptions, IEnumerable`1 source, ParallelOptions parallelOptions, Action`3 body, Boolean shuffle, Boolean useCancellationTokenFromExecutionOptions, Boolean keepGoingOnError)
at Invantive.Cloud.Shared.ODataEdmUtility.A(GlobalState, ExecutionOptions, SqlExecutionStep sqlExecutionStep, DataContextBase, DatabaseConnectionInfo, String, String, HashSet`1, Int32, Boolean, Int32, String, Byte[], String, CancellationToken)
at Invantive.Cloud.Shared.ODataEdmUtility.ConstructDatabaseEdmModel(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, DataContextBase dataContext, DatabaseConnectionInfo databaseConnectionInfo, String databaseSegment, String userName, HashSet`1 allowedProviderNames, Int32 maxColumnCount, Boolean allowNonStandardEdmTypeNames, Int32 cacheLifetimeSec, String edmCacheUserDirectory, CancellationToken cancellationToken)
at Invantive.Bridge.Online.Logic.EdmModelBuilder.ConstructDatabaseEdmModel(GlobalState owner, ExecutionOptions executionOptions, BridgeConfig config, HttpContext httpContext, String databaseSegment) in c:\smoke\ws-26.0\Invantive.Bridge.Online\src\Invantive.Bridge.Online\Logic\EdmModelBuilder.cs:line 215
at Invantive.Web.Core.TaskExtensionMethods.GetOrAddTaskSafe[TTask](IStateHelper stateHelper, GlobalState owner, ExecutionOptions executionOptions, String listName, String key, Func`1 taskFactory, Nullable`1 timeOutMs, String providerName, String dataContainerId, String dataContainerAlias, String partitionCode, String tableName, String sqlStatement, CancellationToken cancellationToken, CancellationToken retrieveCancellationToken)
at Invantive.Bridge.Online.Logic.EdmModelBuilder.EnsureModelLoaded(GlobalState owner, ExecutionOptions executionOptions, BridgeConfig config, HttpContext httpContext, String databaseSegment, CancellationToken cancellationToken) in c:\smoke\ws-26.0\Invantive.Bridge.Online\src\Invantive.Bridge.Online\Logic\EdmModelBuilder.cs:line 83
at Invantive.Bridge.Online.Logic.EdmModelBuilder.GetEdmModel(GlobalState owner, ExecutionOptions executionOptions, BridgeConfig config, HttpContext httpContext, String databaseSegment, CancellationToken cancellationToken) in c:\smoke\ws-26.0\Invantive.Bridge.Online\src\Invantive.Bridge.Online\Logic\EdmModelBuilder.cs:line 49
at Invantive.Bridge.Online.Logic.ODataModelProvider.Invantive.Bridge.Online.Logic.IODataModelProvider.GetEdmModel(GlobalState owner, ExecutionOptions executionOptions, HttpContext httpContext, BridgeConfig config, String databaseSegment, CancellationToken cancellationToken) in c:\smoke\ws-26.0\Invantive.Bridge.Online\src\Invantive.Bridge.Online\Logic\OData\ODataModelProvider.cs:line 18
at Invantive.Bridge.Online.Logic.ODataRoutingMatcherPolicy.ApplyAsync(HttpContext httpContext, CandidateSet candidates) in c:\smoke\ws-26.0\Invantive.Bridge.Online\src\Invantive.Bridge.Online\Logic\OData\ODataRoutingMatcherPolicy.cs:line 104
at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<InLa visualizzazione in cui ho mascherato l'ID nell'istruzione `use`. Come già indicato, questa vista esiste da mesi, ma da martedì provoca un errore durante il caricamento di tutte le tabelle che leggiamo.
```sql
use [administrazione]@eol;
create or replace force view ProjectSubscriptionCodes
as
select
cfd.Id,
cfd.Code,
cfd.Description,
cfd.BUSBV_PROJ_Subscription AS SubscriptionCode,
cfd.Modified
from ( select prj.Division
, prj.Id
, prj.Code
, prj.Description
, prj.Modified
, customvalues.PropertyName
, customvalues.Value
from ExactOnlineREST.Project.Projects prj
left
outer
join CustomFieldValues
( division => prj.Division
, linkId => prj.Id
, BusinessComponentName => 'Project'
) customvalues
where prj.Division = 189708
AND prj.ClassificationDescription in ('Continuous Improvement Services - Vast', 'Continuous Improvement Services - Flessibile', 'Service Level Agreement')
) prj
pivot ( max(prj.value)
for prj.PropertyName in
(
[BUSBV_PROJ_Subscription]
)
) cfd;