Itgenclr000 NullReferenceException
Les réponses sont publiées sur le forum.
Aller à la sourceQuestion
Enfin, j'ai aussi essayé comme décrit ici : evaluate-native-sql-statements-from-invantive-psql :
Ma table TEMP@inmemorystorage est déjà créée ; elle contient quelques enregistrements (sans conflits concernant l'ID (Clé, unique) généré par l'instruction ci-dessous)
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;
mais j'obtiens une erreur :
itgenclr000: Une valeur requise est manquante, ou on suppose à tort qu'une valeur est toujours présente.
J'ai aussi essayé Bulk insert.
Il semble aussi que l'instruction LIMIT soit comme
SELECT * from tblog@catserver LIMIT 10
n'est pas transmis au conteneur dans la requête, mais plutôt au côté Invantive Query SQL (ma supposition compte tenu du temps de requête).
Ce que j'essaie d'obtenir est :
- synchronisation initiale d'une table MySQL source vers une table SQLServer de destination comportant 1,3 millions d'enregistrements.
- exécuter ensuite une mise à jour récurrente planifiée du script de la table cible avec uniquement les nouveaux enregistrements créés dans la source.
Il semble que le serveur MySQL source tronque la charge utile à chaque requête à environ 385K enregistrements en raison de certaines limitations du serveur (temps d'exécution, taille du tampon, etc.) que je ne peux pas modifier et qui ne dépendent pas de moi. Par conséquent, l'étape (1) doit être divisée en lots d'au plus 385K enregistrements.
Réponse acceptée
Cela explique probablement le problème. Le bug a été corrigé dans 2010 et la version 5.1.39 du serveur MySQL a été publiée le 4 septembre 2009.
Le NullReferenceException provient d'une bibliothèque maintenue par MySQL (aujourd'hui Oracle Corp.) et cette bibliothèque ne prend en charge que les versions 5.7 et 8.0. Il n'existe plus de bibliothèque prise en charge qui prenne en charge 5.1.
Il est recommandé de passer à une version plus récente de MySQL, comme 8.0.x.
Répondre 15
Bonjour, après la mise à niveau de MySql vers 8.0.18 fournie par le fournisseur, le problème semble en effet avoir disparu. Merci
Répondre 2
L'erreur itgenclr000 se produit-elle avec la version 22.0 ou avec la BETA 22.1 ?
Répondre 3
Version : Query Tool 22.0.455 PROD+3713
Répondre 4
Pourriez-vous réessayer avec la version 22.0.480 ?
Le problème n'a pas pu être reproduit avec :
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;
Répondre 5
Bonjour, le problème persiste dans mon environnement après la mise à niveau vers 22.0.480
Répondre 6
Assurez-vous que la table tbllog existe dans le conteneur de données avec l'alias catserver. Celle-ci n'est peut-être disponible que dans catrepl.
Dans la version 22.0.482 et ultérieures, une erreur plus appropriée itgenclr121 s'affiche :
itgenclr121 Nom d'objet invalide ‘tbllog’.
Répondre 7
Merci, le conteneur catserver existe et fonctionne.
J'ai essayé un autre moment en remplaçant le insert into qui peut causer des problèmes par un simple 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;
1cette instruction fonctionne très bien et renvoie des résultats.
2l'instruction renvoie itgenclr000
Répondre 8
Je dois signaler un comportement étrange avec le conteneur MySQL.
avec un simple select * from mytable@mysql, j'obtiens parfois la même erreur itgenclr000. Ensuite, j'exécute l'instruction une deuxième fois, et là ça fonctionne.
Cela se produit lorsque :
- accéder pour la première fois à une table jamais interrogée auparavant.
- parfois lorsque vous passez d'une table à une autre dans le même conteneur MySQL
Répondre 9
Le problème avec itgenclr000 continuera de se produire dans 22.0.480 de différentes manières en raison de la nature de la compilation intermédiaire. Lors de la compilation, une évaluation partielle peut être effectuée sur la base de différentes caractéristiques. Le mieux est de réessayer dans la prochaine version.
Un itgenclr000 ne devrait pourtant pas se produire avec select * from mytable@mysql.
Pourriez-vous ajouter les détails (Ouvrir les détails dans la fenêtre d'erreur) au cas où cela se reproduirait ?
Répondre 10
Oui, le voici :
- maintenant sur Query Tool 22.0.482,
- Query Tool fermé,
- Query Tool redémarré, connexions ouvertes (2 conteneurs, SQL Server : @catrepl et MySQL @catserver),
- première requête exécutée :
create or replace table tblresultcodes@catrepl as select * from tblresultcodes@catserver;
avec pour résultat OK (22 rows affected)
- deuxième requête exécutée :
create or replace table tbllegionella@catrepl as select * from tbllegionella@catserver;
Une erreur se produit alors :
itgenclr000: Une valeur obligatoire est manquante ou une valeur est considérée à tort comme étant toujours présente. Une valeur obligatoire est manquante ou une valeur est considérée à tort comme étant toujours présente. Message ID: 26e651cf-b776-4653-b771-63dcd16c0e20 Heure de survenue (UTC) : 04/01/2023 12:12:14 Récupération des métadonnées d'objet pour 'TBLLEGIONELLA’System.NullReferenceException à MySql.Data.MySqlClient.ISSchemaProvider.GetTable(String sql) à MySql.Data.MySqlClient.ISSchemaProvider.GetColumns(String restrictions) à MySql.Data.MySqlClient.ISSchemaProvider.GetSchemaInternal(String collection, String restrictions) à MySql.Data.MySqlClient.SchemaProvider.GetSchema(String collection, String restrictions) à MySql.Data.MySqlClient.MySqlConnection.GetSchema(String collectionName, String restrictionValues) à Invantive.Data.Providers.MySql.MySqlProvider.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, Connection connection, IEnumerable1 objectSpecifications, Boolean raiseErrorIfNotFound)— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée — à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Invantive.Basics.ErrorConstants.ThrowOneOrMoreExceptions(GlobalState owner, ExecutionOptions executionOptions, IEnumerable1 exceptions) à Invantive.Data.Providers.MySql.MySqlProvider.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, Connection connection, IEnumerable1 objectSpecifications, Boolean raiseErrorIfNotFound) à Invantive.Data.AnsiSqlProviderBase.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, ObjectSpecification objectSpecification, Boolean raiseErrorIfNotFound)— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée — à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Invantive.Data.AnsiSqlProviderBase.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, ObjectSpecification objectSpecification, Boolean raiseErrorIfNotFound)— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée — à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Invantive.Data.AnsiSqlProviderBase.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, ObjectSpecification objectSpecification, Boolean raiseErrorIfNotFound) à Invantive.Sql.V1.DataSourceOrFunctionTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) à Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) à Invantive.Sql.V1.SelectStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) à Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) à Invantive.Sql.V1.DdlStatementTree.OnExecute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) à Invantive.Sql.V1.QueryTree.Execute(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) à Invantive.Sql.V1.QueryPlan.ForcePlan(GlobalState owner, ExecutionOptions executionOptions) à Invantive.Sql.V1.QueryPlan.Fetch(GlobalState owner, ExecutionOptions executionOptions, String sqlStatement) à Invantive.Data.ConnectionManager.EG.L(QueryPlan ) à System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() à System.Linq.Buffer1..ctor(IEnumerable1 source) à System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) à Invantive.Data.ConnectionManager.ExecuteAndCombineQueryPlansV1(GlobalState owner, ExecutionOptions executionOptions, QueryPlan queryPlans, String sqlStatement, ParameterList parameters) à Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée — à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) à Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée — à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) à Invantive.Data.ActionProceduresBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters) à Invantive.Producer.Windows.Forms.QueryToolResults.AZQ(GlobalState , ExecutionOptions , IProgressNotifier , String , ParameterList , Boolean , Boolean , Boolean , Boolean ) dans c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolTraceViewModel.cs:ligne 17 à Invantive.Producer.Windows.Forms.QueryToolResults.UZQ(GlobalState , ExecutionOptions , String , ParameterList ) dans c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolDbmsOutputViewModel.cs:ligne 135
- deuxième requête réexécutée :
create or replace table tbllegionella@catrepl as select * from tbllegionella@catserver;
alors ça fonctionne (11 lignes concernées)
Répondre 11
J'ai aussi essayé ce qui suit avec DATACONTAINER ‘catserver’ étant 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;
dans ce cas, j'obtiens l'erreur ci-dessous.
J'ai exécuté la même requête sur SqlServer, et elle fonctionne très bien.
itgenase302 : Lecteur de données non défini. ID du message : 64672898-e79c-4488-8d78-f65e51382cf9Survenu (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('Valeur : ’ || l_value);end;ValidationException à 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() à Invantive.Sql.V1.FirehoseResultSet.CX.MoveNext() à Invantive.Sql.V1.QueryPlan.WW.MoveNext() à Invantive.Data.ExtensionMethods.STR1.KTR.MoveNext() à System.Collections.Generic.List1..ctor(IEnumerable1 collection) à System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) à Invantive.Data.ConnectionManager.EG.L(QueryPlan ) à System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() à System.Linq.Buffer1..ctor(IEnumerable1 source) à System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) à Invantive.Data.ConnectionManager.ExecuteAndCombineQueryPlansV1(GlobalState owner, ExecutionOptions executionOptions, QueryPlan queryPlans, String sqlStatement, ParameterList parameters) à Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) à Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) à Invantive.Data.ActionProceduresBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters) à Invantive.Producer.Windows.Forms.QueryToolResults.AZQ(GlobalState , ExecutionOptions , IProgressNotifier , String , ParameterList , Boolean , Boolean , Boolean , Boolean ) à Invantive.Producer.Windows.Forms.QueryToolResults.UZQ(GlobalState , ExecutionOptions , String , ParameterList ) à Invantive.Producer.Windows.Forms.QueryToolResults.OB.G() à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean synchronizeSyncCtx) à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean synchronizeSyncCtx) à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) à System.Threading.ThreadHelper.ThreadStart() à Invantive.Data.AnsiSqlProviderBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String loggingTableName)— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée — à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à 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.d__29.MoveNext() à 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() à System.Collections.Generic.List1..ctor(IEnumerable1 collection) à System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) à Invantive.Data.ConnectionManager.EG.L(QueryPlan ) à System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() à System.Linq.Buffer1..ctor(IEnumerable1 source) à System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) à Invantive.Data.ConnectionManager.ExecuteAndCombineQueryPlansV1(GlobalState owner, ExecutionOptions executionOptions, QueryPlan queryPlans, String sqlStatement, ParameterList parameters) à Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) à Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule)— Fin de la trace de la pile à partir de l’emplacement précédent au niveau duquel l’exception a été levée — à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() à Invantive.Data.ConnectionManager.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters, String callSafeNameOverrule) à Invantive.Data.ActionProceduresBase.PassthroughSqlActionTable(GlobalState owner, ExecutionOptions executionOptions, String actionSql, ParameterList parameters) à Invantive.Producer.Windows.Forms.QueryToolResults.AZQ(GlobalState , ExecutionOptions , IProgressNotifier , String , ParameterList , Boolean , Boolean , Boolean , Boolean ) dans c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolTraceViewModel.cs:ligne 17 à Invantive.Producer.Windows.Forms.QueryToolResults.UZQ(GlobalState , ExecutionOptions , String , ParameterList ) dans c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolDbmsOutputViewModel.cs:ligne 135
Répondre 12
Quelle version de MySQL est-ce et quand a-t-elle été publiée ?
L'erreur NullReferenceException semble liée à un bug dans une ancienne version du serveur MySQL. À partir de la version 24.0, une vérification de la version MySQL est effectuée afin de s'assurer qu'il s'agit d'une version prise en charge par le pilote :
Moteur Version Date de publication MySQL 5.7.x 21 octobre 2015 MySQL 8.0.x 19 avril 2018 MariaDB 10.2.x 18 avril 2016 MariaDB 10.3.x 16 avril 2017 MariaDB 10.4.x 9 novembre 2018 MariaDB 10.5.x 3 décembre 2019 MariaDB 10.6.x 26 avril 2021 MariaDB 10.7.x 17 septembre 2021 MariaDB 10.8.x 21 septembre 2021 MariaDB 10.9.x 23 mars 2022 MariaDB 10.10.x 21 juin 2022 MariaDB 10.11.x 26 septembre 2022 MariaDB 11.0.x 27 décembre 2022
Vous trouverez plus d'informations de compatibilité sur :
Répondre 13
La version du serveur MySQL est 5.1.39. Semble être hors bande :frowning:




