Documentación de Invantiveparte de Invantive Cloud
Foros de Soporte de InvantiveIniciar Sesión / Registrarse

Itgenclr000 NullReferenceException

Las respuestas se publican en el foro.

Ir a la fuente

Question

Por último, también lo intenté como se describe aquí: evaluate-native-sql-statements-from-invantive-psql :

Mi tabla TEMP@inmemorystorage ya está creada; contiene algunos registros (sin conflictos con respecto al ID (Key, único) generados por la siguiente stmt)

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;

pero aparece un error:

itgenclr000: Falta un valor obligatorio o se asume incorrectamente que un valor siempre está presente.

También probé Bulk insert.

Además, parece que la instrucción LIMIT como

SELECT * from tblog@catserver LIMIT 10

no se pasa al contenedor en la consulta, sino más bien al lado de Invantive Query SQL (mi suposición dado el tiempo de consulta).

Todo lo que intento conseguir es:

  • primero sincronizar desde un MySQL de origen a una tabla de destino SQLServer con 1,3 millones de registros.
  • después ejecutar una actualización periódica programada del script de la tabla de destino con solo los registros nuevos creados en el origen.

Parece que el servidor MySQL de origen recorta la carga en cada solicitud a aproximadamente 385 K registros debido a algunas limitaciones del servidor (tiempo de ejecución, tamaño del búfer, etc.) que no puedo cambiar y que no están bajo mi control. Por lo tanto, el paso (1) debe dividirse en lotes de no más de 385K registros.

Respuesta aceptada

Eso probablemente explica el problema. El error se corrigió en 2010 y la versión 5.1.39 del servidor MySQL se publicó el 4 de septiembre 2009.

El NullReferenceException proviene de una biblioteca mantenida por MySQL (ahora Oracle Corp.) y esta biblioteca solo admite las versiones 5.7 y 8.0. Ya no hay ninguna biblioteca compatible disponible que admita 5.1.

Se recomienda actualizar a una versión más reciente de MySQL, como 8.0.x.

Responder 15

Hola, tras la actualización de MySql a 8.0.18 del proveedor, el problema parece haber desaparecido efectivamente. Gracias

Responder 2

¿Se produce el error itgenclr000 en la versión release 22.0 o en la BETA 22.1?

Responder 3

Versión : Query Tool 22.0.455 PROD+3713

Responder 4

¿Podría volver a intentarlo con la versión 22.0.480?

El problema no se pudo reproducir 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;

Responder 5

Hola, buenos días, el problema sigue presente en mi entorno tras actualizar a 22.0.480

Captura de pantalla 2023-01-03 a 09.25.25

Responder 6

Asegúrese de que la tabla tbllog exista en el contenedor de datos con el alias catserver. Esto podría estar disponible solo en catrepl.

En la versión 22.0.482 y posteriores se muestra un error más adecuado itgenclr121:

itgenclr121 Nombre de objeto no válido «tbllog».

Responder 7

Gracias, el contenedor catserver existe y funciona.

He probado otro momento sustituyendo el insert into que puede causar problemas por un dbms_output.put_line sencillo:

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;

1Esta instrucción funciona perfectamente y obtiene resultados.

Captura de pantalla 2023-01-04 a 09.16.02

El statement 2 recibe itgenclr000

Captura de pantalla 2023-01-04 a 09.16.11

Responder 8

Debo mencionar que se produce un comportamiento extraño con el contenedor MySQL.

Con un select * from mytable@mysql sencillo a veces obtengo el mismo error itgenclr000. Entonces ejecuto la instrucción una segunda vez y entonces funciona.

Esto ocurre cuando:

  • acceder por primera vez a una tabla que nunca se ha consultado.
  • a veces, al cambiar de una tabla a otra tabla en el mismo contenedor MySQL

Responder 9

El problema con itgenclr000 seguirá apareciendo en 22.0.480 de distintas formas debido a la naturaleza de la compilación intermedia. Durante la compilación puede realizarse una evaluación parcial basada en diversas características. Lo mejor es volver a intentarlo en la próxima versión.

Sin embargo, un itgenclr000 no debería producirse con select * from mytable@mysql.

¿Puede añadir los detalles (abrir Detalles en la ventana de errores) por si vuelve a ocurrir?

Responder 10

Sí, aquí está:

  • ahora en Query Tool 22.0.482,
  • Query Tool cerrado,
  • Query Tool reiniciado, conexiones abiertas (2 contenedores, SQL Server: @catrepl y MySQL @catserver),
  • primera query ejecutada:
create or replace table tblresultcodes@catrepl as select * from tblresultcodes@catserver;

con resultado OK (22 rows affected)

  • segunda query ejecutada:
create or replace table tbllegionella@catrepl as select * from tbllegionella@catserver;

Entonces se produce un error:

Captura de pantalla 2023-01-04 a 13.13.07

itgenclr000: Fallo genérico de software. Faltan datos requeridos. Fallo genérico de software. Faltan datos requeridos. Message ID: 26e651cf-b776-4653-b771-63dcd16c0e20 Fecha de ocurrencia (UTC): 04/01/2023 12:12:14 Retrieval object metadata for '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 traza de la pila a partir de la ubicación anterior en la que se lanzó la excepción — à 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)— Fin de la traza de la pila a partir de la ubicación anterior en la que se lanzó la excepción — à System.Runtime.AnsiSqlProviderBase.GetObjectMetadata.Throw() à Invantive.Data.GlobalState.ExecutionOptions(executionOptions owner, ObjectSpecification objectSpecification, raiseErrorIfNotFound ExceptionServices, Boolean ExceptionDispatchInfo)— Fin de la traza de la pila a partir de la ubicación anterior en la que se lanzó la excepción — à System.Runtime.AnsiSqlProviderBase.GetObjectMetadata.Throw() à Invantive.Data.GlobalState.ExecutionOptions(executionOptions owner, ObjectSpecification objectSpecification, raiseErrorIfNotFound ExceptionServices, Boolean ExceptionDispatchInfo) à Invantive.Sql.V1.AnsiSqlProviderBase.GetObjectMetadata(GlobalState owner, ExecutionOptions executionOptions, ObjectSpecification parameters, objectSpecification raiseErrorIfNotFound) à Invantive.Sql.V1.DataSourceOrFunctionTree.Execute(OnExecute owner, GlobalState ExecutionOptions, executionOptions parameters, ParameterList ExpressionParser) à Invantive.Sql.V1.expressionParser.QueryTree(GlobalState owner, ExecutionOptions executionOptions, ParameterList parameters, ExpressionParser expressionParser) à Invantive.Sql.V1.SelectStatementTree.Execute(OnExecute owner, GlobalState ExecutionOptions, executionOptions parameters, ParameterList ExpressionParser) à Invantive.Sql.V1.expressionParser.QueryTree(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 traza de la pila a partir de la ubicación anterior en la que se lanzó la excepción — à 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 traza de la pila a partir de la ubicación anterior en la que se lanzó la excepción — à 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 ) en c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolTraceViewModel.cs:línea 17 à Invantive.Producer.Windows.Forms.QueryToolResults.UZQ(GlobalState , ExecutionOptions , String , ParameterList ) en c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolDbmsOutputViewModel.cs:línea 135

  • segunda query ejecutada de nuevo:
create or replace table tbllegionella@catrepl as select * from tbllegionella@catserver;

entonces funciona (11 filas afectadas)

Responder 11

También probé lo siguiente con DATACONTAINER ‘catserver’ siendo 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;

en ese caso recibo el error siguiente.

Probé la misma query en SqlServer, y funciona perfectamente.

itgenase302: Data reader no establecido. Message ID: 64672898-e79c-4488-8d78-f65e51382cf9Occurred (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 à Invantive.Basics.ValidationException..ctor(GlobalState owner, ExecutionOptions executionOptions, String messageCode, String errorMessage, String kindRequest, String localStackTrace, String nk, Exception innerException, Boolean inheritMessageCodeWhenPresent, Nullable1 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 traza de la pila a partir de la ubicación anterior en la que se lanzó la excepción — à 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 traza de la pila a partir de la ubicación anterior en la que se lanzó la excepción — à 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 ) en c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolTraceViewModel.cs:línea 17 à Invantive.Producer.Windows.Forms.QueryToolResults.UZQ(GlobalState , ExecutionOptions , String , ParameterList ) en c:\smoke\ws-22.0\Invantive.Producer\src\Invantive.Producer.Windows.Forms\QueryTool\QueryToolDbmsOutputViewModel.cs:línea 135

Captura de pantalla 2023-01-04 a 13.30.33

Responder 12

¿Qué versión de MySQL es y cuándo se publicó?

El error NullReferenceException parece relacionado con un error en una versión antigua del servidor MySQL. A partir de la versión 24.0, se realiza una comprobación de la versión de MySQL para asegurar que sea una versión compatible con el controlador:

Motor Versión Fecha de lanzamiento MySQL 5.7.x 21 octubre 2015 MySQL 8.0.x 19 abril 2018 MariaDB 10.2.x 18 abril 2016 MariaDB 10.3.x 16 abril 2017 MariaDB 10.4.x 9 noviembre 2018 MariaDB 10.5.x 3 diciembre 2019 MariaDB 10.6.x 26 abril 2021 MariaDB 10.7.x 17 septiembre 2021 MariaDB 10.8.x 21 septiembre 2021 MariaDB 10.9.x 23 marzo 2022 MariaDB 10.10.x 21 junio 2022 MariaDB 10.11.x 26 septiembre 2022 MariaDB 11.0.x 27 diciembre 2022

Encontrará más información sobre compatibilidad en:

Responder 13

La versión del servidor MySQL es 5.1.39. Parece estar fuera de banda :frowning:

Responder en el foro