Itgenclr000 NullReferenceException
Le risposte vengono pubblicate sul forum.
Vai alla fonteQuestion
Infine, ho provato anche questo come descritto qui: evaluate-native-sql-statements-from-invantive-psql :
La mia tabella TEMP@inmemorystorage è già stata creata; contiene alcuni record (senza conflitti relativi all'ID (chiave, univoco) generato dall'istruzione sotto)
begin
for r in (execute native 'SELECT * FROM tbllog WHERE ID BETWEEN 1000 AND 2000' DATACONTAINER 'catserver')
loop
insert into TEMP@InMemoryStorage
(ID, BeginVerbruik, EindVerbruik, GastID, LocatieID, KaartNummer, Result, BeginDatumTijd, EindDatumTijd)
values (r.ID, r.BeginVerbruik, r.EindVerbruik, r.GastID, r.LocatieID, r.KaartNummer, r.Result, r.BeginDatumTijd, r.EindDatumTijd);
end loop;
end;
ma ricevo un errore:
itgenclr000: Manca un valore richiesto oppure si presume erroneamente che un valore sia sempre presente.
Ho provato anche Bulk insert.
Inoltre sembra che l’istruzione LIMIT come
SELECT * from tblog@catserver LIMIT 10
non viene passato al contenitore nella query, ma piuttosto lato Invantive Query SQL (è la mia ipotesi dato il tempo di query).
Tutto ciò che cerco di ottenere è:
- prima sincronizzo una tabella di origine MySQL in una tabella di destinazione SQLServer con 1,3 milioni di record.
- eseguire quindi un aggiornamento script pianificato ricorrente della tabella di destinazione con solo i nuovi record creati nell'origine.
Sembra che il server MySQL di origine tronchi il carico utile a ogni richiesta a circa 385K record a causa di alcune limitazioni del server (tempo di esecuzione, dimensione del buffer ecc.) che non posso modificare e che non sono sotto il mio controllo. Di conseguenza il passaggio (1) deve essere suddiviso in batch di non più di 385K record.
Risposta accettata
Questo spiega probabilmente il problema. Il bug è stato risolto in 2010 e la versione 5.1.39 del server MySQL è stata rilasciata il 4 settembre 2009.
L'NullReferenceException deriva da una libreria mantenuta da MySQL (ora Oracle Corp.) e questa libreria supporta solo le versioni 5.7 e 8.0. Non è più disponibile una libreria supportata che supporti 5.1.
Si consiglia di aggiornare a una versione più recente di MySQL, come 8.0.x.
Rispondi 15
Ciao, dopo l'aggiornamento da MySql a 8.0.18 fornito dal fornitore, il problema sembra effettivamente scomparso. Grazie
Rispondi 2
L'errore itgenclr000 si verifica con la release 22.0 o con la BETA 22.1?
Rispondi 3
Versione: Query Tool 22.0.455 PROD+3713
Rispondi 4
Potete per favore riprovare con la release 22.0.480?
Il problema non si è potuto riprodurre con:
create table TEMP@InMemoryStorage as select * from DB.tbllog
begin
for r in (execute native 'SELECT * FROM DB.tbllog WHERE ID BETWEEN 1000 AND 2000' DATACONTAINER 'MySql')
loop
insert into TEMP@InMemoryStorage
(ID, BeginVerbruik, EindVerbruik, GastID, LocatieID, KaartNummer, Result, BeginDatumTijd, EindDatumTijd)
values (r.ID, r.BeginVerbruik, r.EindVerbruik, r.GastID, r.LocatieID, r.KaartNummer, r.Result, r.BeginDatumTijd, r.EindDatumTijd);
end loop;
end;
Rispondi 5
Salve, buongiorno, il problema è ancora presente nel mio ambiente dopo l’aggiornamento a 22.0.480
Rispondi 6
Assicurarsi che la tabella tbllog nel contenitore dati con alias catserver esista. Questa potrebbe essere disponibile solo in catrepl.
Nella versione 22.0.482 e successive viene visualizzato un errore più appropriato itgenclr121:
itgenclr121 Nome oggetto non valido ‘tbllog’.
Rispondi 7
Grazie, il container catserver esiste e funziona.
Ho provato un altro momento sostituendo il insert into che può causare problemi con un semplice dbms_output.put_line:
select * from tbllog@catserver WHERE ID BETWEEN 1 AND 1000
begin
for r in (execute native 'SELECT * FROM tbllog WHERE ID BETWEEN 1 AND 1000' DATACONTAINER 'catserver')
loop
dbms_output.put_line('Value n1: ' || r.ID);
-- invoegen in TEMP@InMemoryStorage
-- (ID, BeginVerbruik, EindVerbruik, GastID, LocatieID, KaartNummer, Result, BeginDatumTijd, EindDatumTijd)
-- waarden (r.ID, r.BeginVerbruik, r.EindVerbruik, r.GastID, r.LocatieID, r.KaartNummer, r.Result, r.BeginDatumTijd, r.EindDatumTijd);
end loop;
end;
1 l'istruzione funziona bene e restituisce risultati.
2lo statement riceve itgenclr000
Rispondi 8
Devo segnalare che si verifica un comportamento strano con il contenitore MySQL.
con un semplice select * from mytable@mysql ricevo a volte lo stesso errore itgenclr000. Poi eseguo l'istruzione una seconda volta, e funziona.
Questo accade quando:
- accedere per la prima volta a una tabella mai interrogata prima.
- a volte quando si passa da una tabella a un’altra nello stesso container MySQL
Rispondi 9
Il problema con itgenclr000 continuerà a presentarsi in 22.0.480 in diversi modi a causa della natura della compilazione intermedia. Durante la compilazione può essere eseguita una valutazione parziale in base a diverse caratteristiche. La cosa migliore è riprovare nella prossima release.
Un itgenclr000 però non dovrebbe verificarsi con select * from mytable@mysql.
Potete aggiungere i dettagli (Apri dettagli nella finestra degli errori) nel caso in cui si ripresenti?
Rispondi 10
Sì, eccolo:
- ora su Query Tool 22.0.482,
- chiuso Query Tool,
- Query Tool riavviato, connessioni aperte (2 contenitori, SQL Server: @catrepl e MySQL @catserver),
- prima query eseguita:
create or replace table tblresultcodes@catrepl as select * from tblresultcodes@catserver;
con risultato OK (22 rows affected)
- seconda query eseguita:
create or replace table tbllegionella@catrepl as select * from tbllegionella@catserver;
Allora si verifica un errore:
itgenclr000: Manca un valore obbligatorio o si presume erroneamente che un valore sia sempre presente. Manca un valore obbligatorio o si presume erroneamente che un valore sia sempre presente. Message ID: 26e651cf-b776-4653-b771-63dcd16c0e20 Verificato (UTC): 04/01/2023 12:12:14 Recupero dei metadati dell'oggetto per 'TBLLEGIONELLA’System.NullReferenceException in MySql.Data.MySqlClient.ISSchemaProvider.GetTable(String sql) in MySql.Data.MySqlClient.ISSchemaProvider.GetColumns(String restrictions) in MySql.Data.MySqlClient.ISSchemaProvider.GetSchemaInternal(String collection, String restrictions) in MySql.Data.MySqlClient.SchemaProvider.GetSchema(String collection, String restrictions) in MySql.Data.MySqlClient.MySqlConnection.GetSchema(String collectionName, String restrictionValues) in Invantive.Data.Providers.MySql.MySqlProvider.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, Connection connection, IEnumerable1 objectSpecifications, Boolean raiseErrorIfNotFound)— Fine della traccia dello stack dal punto precedente in cui è stata sollevata l'eccezione — in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Invantive.Basics.ErrorConstants.ThrowOneOrMoreExceptions(GlobalState owner, ExecutionOptions executionOptions, IEnumerable1 exceptions) in Invantive.Data.Providers.MySql.MySqlProvider.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, Connection connection, IEnumerable1 objectSpecifications, Boolean raiseErrorIfNotFound) in Invantive.Data.AnsiSqlProviderBase.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, ObjectSpecification objectSpecification, Boolean raiseErrorIfNotFound)— Fine della traccia dello stack dal punto precedente in cui è stata sollevata l'eccezione — in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Invantive.Data.AnsiSqlProviderBase.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, ObjectSpecification objectSpecification, Boolean raiseErrorIfNotFound)— Fine della traccia dello stack dal punto precedente in cui è stata sollevata l'eccezione — in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Invantive.Data.AnsiSqlProviderBase.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, ObjectSpecification objectSpecification, Boolean raiseErrorIfNotFound) in Invantive.Sql.V1.DataSourceOrFunctionTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) in Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) in Invantive.Sql.V1.SelectStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) in Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) in Invantive.Sql.V1.DdlStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) in Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) in Invantive.Sql.V1.QueryPlan.ForcePlan(GlobalState owner, ExecutionOptions executionOptions) in Invantive.Sql.V1.QueryPlan.Fetch(GlobalState owner, ExecutionOptions executionOptions, String sqlStatement) in Invantive.Data.ConnectionManager.EG.L(QueryPlan ) in System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() in System.Linq.Buffer1..ctor(IEnumerable1 source) in System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) in Invantive.Data.ConnectionManager.ExecuteAndCombineQueryPlansV1(GlobalState owner, ExecutionOptions executionOptions, QueryPlan queryPlans, String sqlStatement, ParameterList parameters) in Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)— Fine della traccia dello stack dal punto precedente in cui è stata sollevata l'eccezione — in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) in Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)— Fine della traccia dello stack dal punto precedente in cui è stata sollevata l'eccezione — in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) in Invantive.Data.ActionProceduresBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters) in Invantive.Producer.Windows.Forms.QueryToolResults.AZQ(GlobalState , ExecutionOptions , IProgressNotifier , String , ParameterList , Boolean , Boolean , Boolean , Boolean ) in c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolTraceViewModel.cs:riga 17 in Invantive.Producer.Windows.Forms.QueryToolResults.UZQ(GlobalState , ExecutionOptions , String , ParameterList ) in c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolDbmsOutputViewModel.cs:riga 135
- seconda query eseguita di nuovo:
create or replace table tbllegionella@catrepl as select * from tbllegionella@catserver;
allora funziona (11 righe interessate)
Rispondi 11
Ho provato anche quanto segue con DATACONTAINER 'catserver' che è mysql
Declare
l_value varchar2;
begin
execute native 'SELECT MAX(ID) FROM tbllog' into l_value DATACONTAINER 'catserver' ;
dbms_output.put_line('Value: ' || l_value);
end;
in quel caso ricevo l'errore sotto.
Ho provato la stessa query su SqlServer, e funziona benissimo.
itgenase302: lettore dati non impostato. Message ID: 64672898-e79c-4488-8d78-f65e51382cf9Verificatosi (UTC): 04/01/2023 12:28:55Declare l_value varchar2;begin execute native ‘SELECT MAX(ID) FROM tbllog’ into l_value DATACONTAINER ‘catserver’ ; dbms_output.put_line(‘Value: ’ || l_value);end;ValidationException in 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, Boolean isRecoverable, String poolIdentityId, String url) à Invantive.Data.AnsiSqlProviderBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String loggingTableName) à Invantive.Sql.V1.PSqlParser.PassthroughSqlActionTableNative(GlobalState owner, ExecutionOptions executionOptions, IProviderManager manager, String sqlStatement, IDataProvider provider, ParameterList parameters, ISparseArray variablesRow, DatabaseColumn[] variablesInScope, DatabaseColumn[] intoVariables) à LambaExecutePSqlTree42(Closure , GlobalState , ExecutionOptions , IQueryStatePerExecution , ISparseArray , ISparseArray ) à Invantive.Sql.V1.PSqlStatementTree.<Fetch>d__29.MoveNext() à Invantive.Data.CompressedEnumerable1.d__10.MoveNext() in Invantive.Sql.V1.FirehoseResultSet.CX.MoveNext() in Invantive.Sql.V1.QueryPlan.WW.MoveNext() in Invantive.Data.ExtensionMethods.STR1.KTR.MoveNext() à System.Collections.Generic.List1..ctor(IEnumerable1 collection) à System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) in Invantive.Data.ConnectionManager.EG.L(QueryPlan ) in System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() à System.Linq.Buffer1..ctor(IEnumerable1 source) à System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) in Invantive.Data.ConnectionManager.ExecuteAndCombineQueryPlansV1(GlobalState owner, ExecutionOptions executionOptions, QueryPlan queryPlans, String sqlStatement, ParameterList parameters) in Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) in Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) in Invantive.Data.ActionProceduresBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters) in Invantive.Producer.Windows.Forms.QueryToolResults.AZQ(GlobalState , ExecutionOptions , IProgressNotifier , String , ParameterList , Boolean , Boolean , Boolean , Boolean ) in Invantive.Producer.Windows.Forms.QueryToolResults.UZQ(GlobalState , ExecutionOptions , String , ParameterList ) in Invantive.Producer.Windows.Forms.QueryToolResults.OB.G() in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean synchronizeSyncCtx) in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean synchronizeSyncCtx) in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in System.Threading.ThreadHelper.ThreadStart() in Invantive.Data.AnsiSqlProviderBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String loggingTableName)— Fine della traccia dello stack a partire dalla posizione precedente in cui è stata sollevata l’eccezione — in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Invantive.Data.AnsiSqlProviderBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String loggingTableName) in Invantive.Sql.V1.PSqlParser.PassthroughSqlActionTableNative(GlobalState owner, ExecutionOptions executionOptions, IProviderManager manager, String sqlStatement, IDataProvider provider, ParameterList parameters, ISparseArray variablesRow, DatabaseColumn variablesInScope, DatabaseColumn intoVariables) in LambaExecutePSqlTree42(Closure , GlobalState , ExecutionOptions , IQueryStatePerExecution , ISparseArray , ISparseArray ) in Invantive.Sql.V1.PSqlStatementTree.d__29.MoveNext() in Invantive.Data.CompressedEnumerable1.<GetEnumerator>d__10.MoveNext() à Invantive.Sql.V1.FirehoseResultSet.CX.MoveNext() à Invantive.Sql.V1.QueryPlan.WW.MoveNext() à Invantive.Data.ExtensionMethods.STR1.KTR.MoveNext() in System.Collections.Generic.List1..ctor(IEnumerable1 collection) in System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) in Invantive.Data.ConnectionManager.EG.L(QueryPlan ) in System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() à System.Linq.Buffer1..ctor(IEnumerable1 source) à System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) in Invantive.Data.ConnectionManager.ExecuteAndCombineQueryPlansV1(GlobalState owner, ExecutionOptions executionOptions, QueryPlan queryPlans, String sqlStatement, ParameterList parameters) in Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) in Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)— Fine della traccia dello stack a partire dalla posizione precedente in cui è stata sollevata l’eccezione — in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) in Invantive.Data.ActionProceduresBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters) in Invantive.Producer.Windows.Forms.QueryToolResults.AZQ(GlobalState , ExecutionOptions , IProgressNotifier , String , ParameterList , Boolean , Boolean , Boolean , Boolean ) in c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolTraceViewModel.cs:riga 17 in Invantive.Producer.Windows.Forms.QueryToolResults.UZQ(GlobalState , ExecutionOptions , String , ParameterList ) in c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolDbmsOutputViewModel.cs:riga 135
Rispondi 12
Quale versione di MySQL è e quando è stata rilasciata?
L'errore NullReferenceException sembra correlato a un bug in una vecchia versione del server MySQL. A partire dalla release 24.0 viene eseguito un controllo della versione MySQL per assicurarsi che sia una versione supportata dal driver:
Engine Versione Data di rilascio MySQL 5.7.x 21 ottobre 2015 MySQL 8.0.x 19 aprile 2018 MariaDB 10.2.x 18 aprile 2016 MariaDB 10.3.x 16 aprile 2017 MariaDB 10.4.x 9 novembre 2018 MariaDB 10.5.x 3 dicembre 2019 MariaDB 10.6.x 26 aprile 2021 MariaDB 10.7.x 17 settembre 2021 MariaDB 10.8.x 21 settembre 2021 MariaDB 10.9.x 23 marzo 2022 MariaDB 10.10.x 21 giugno 2022 MariaDB 10.11.x 26 settembre 2022 MariaDB 11.0.x 27 dicembre 2022
Ulteriori informazioni sulla compatibilità si trovano su:
Rispondi 13
La versione del server MySQL è 5.1.39. Sembra essere fuori banda :frowning:




