OverflowException in IIS x64
OverflowException in IIS x64
Hi
After installing the x64 client for Oracle, it appears that the CoreLab is loaded, but when trying to use it we get the following error:
[OverflowException: La operación aritmética ha provocado un desbordamiento.]
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros, TransaccionBD& oTrans) +921
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros) +102
Web_Recipap.index.btnEntrar_Click(Object sender, ImageClickEventArgs e) in C:\proyectos\Aplicaciones\SGR\Recipap DESARROLLO_S811\WebUI\Home\index.aspx.vb:118
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +168
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215
The installed client is:
10g Release 2 (10.2) for Microsoft Windows (x64)
Any advices in this problem?
Best Regards
Ernesto
After installing the x64 client for Oracle, it appears that the CoreLab is loaded, but when trying to use it we get the following error:
[OverflowException: La operación aritmética ha provocado un desbordamiento.]
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros, TransaccionBD& oTrans) +921
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros) +102
Web_Recipap.index.btnEntrar_Click(Object sender, ImageClickEventArgs e) in C:\proyectos\Aplicaciones\SGR\Recipap DESARROLLO_S811\WebUI\Home\index.aspx.vb:118
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +168
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215
The installed client is:
10g Release 2 (10.2) for Microsoft Windows (x64)
Any advices in this problem?
Best Regards
Ernesto
According to the stack trace OverflowException is probably caused by BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros, TransaccionBD& oTrans).
Please make sure this exception is caused by our components. If it is really an error of our product, provide us with sample project or some lines of code that we can use to reproduce the error.
Please make sure this exception is caused by our components. If it is really an error of our product, provide us with sample project or some lines of code that we can use to reproduce the error.
The same code works fine in my x86 development machine.
The referenced code is:
Public Sub ProcAlmacExecute(ByVal sStoredProcedure As String, _
ByRef ListaParametros As ListaParamsBD, _
ByRef oTrans As TransaccionBD)
Dim oConexion As OracleConnection ' Objeto Base de Datos de Oracle Objects
Dim cmdCommand As New OracleCommand ' Objeto que almacena la información acerca de la ejecución de una operación SQL
Dim oraTrans As OracleTransaction 'Transacción dentro la que se realiza la ejecución
Try
'Comprueba si ha recibido un objeto transacción para incluir la
'ejecución del procedimiento almacenado dentro de la misma
If oTrans Is Nothing Then
'Define un nuevo objeto de conexión
oConexion = New OracleConnection(_sCadenaDeConexion)
oraTrans = Nothing
Else
'usa el objeto de conexión ligado a la transacción
Dim oDatosTrans As stTransaccion
oDatosTrans = TransaccionObtener(oTrans.GetTransId)
oConexion = oDatosTrans.Conexion
oraTrans = oDatosTrans.Trans
End If
' Rellenar propiedades del comando
cmdCommand.Connection = oConexion
cmdCommand.CommandText = sStoredProcedure
cmdCommand.CommandType = CommandType.StoredProcedure
'Cambio al usar el ODP: Ya no es necesario establecer la
'propiedad Transaction del objeto command, lo realiza automaticamente
'el objeto connection de Oracle
cmdCommand.Transaction = oraTrans
'Si se ha recibido un objeto de tipo ListaParametros
'se intenta cargar los parámetros en el objeto command
If (Not ListaParametros Is Nothing) Then
'carga los parámetros de la llamada en el objeto command
RellenaParametros(cmdCommand, ListaParametros)
End If
'Si la ejecución está fuera de una transacción, se abre una conexión
If oTrans Is Nothing Then
Abrir(oConexion)
End If
' Ejecutar comando
cmdCommand.ExecuteNonQuery()
'Si la ejecución está fuera de una transacción, se cierra una conexión
If oTrans Is Nothing Then
Cerrar(oConexion)
End If
'Actualiza los parámetros de salida modificados
' por el procedimiento almacenado
ActualizaParametrosSalida(ListaParametros, cmdCommand)
'Se liberan los recursos de base de datos usados
cmdCommand.Dispose()
Catch ex As Exception
'Al producirse un error, se realiza el cierre de la conexión
'Si la ejecución está fuera de una transacción
'de estar en una transacción, la conexión debe ser cerrada
'haciendo un rollback de la transacción
If oTrans Is Nothing Then
Cerrar(oConexion)
End If
'Se relanza la excepción
Throw ex
End Try
End Sub
Private Sub Cerrar(ByRef oConexion As OracleConnection)
' Cerrar conexion si está abierta
If oConexion.State = ConnectionState.Open Then
oConexion.Close()
'oConexion.Dispose()
oConexion.Dispose()
End If
End Sub
Thanks in advance.
The referenced code is:
Public Sub ProcAlmacExecute(ByVal sStoredProcedure As String, _
ByRef ListaParametros As ListaParamsBD, _
ByRef oTrans As TransaccionBD)
Dim oConexion As OracleConnection ' Objeto Base de Datos de Oracle Objects
Dim cmdCommand As New OracleCommand ' Objeto que almacena la información acerca de la ejecución de una operación SQL
Dim oraTrans As OracleTransaction 'Transacción dentro la que se realiza la ejecución
Try
'Comprueba si ha recibido un objeto transacción para incluir la
'ejecución del procedimiento almacenado dentro de la misma
If oTrans Is Nothing Then
'Define un nuevo objeto de conexión
oConexion = New OracleConnection(_sCadenaDeConexion)
oraTrans = Nothing
Else
'usa el objeto de conexión ligado a la transacción
Dim oDatosTrans As stTransaccion
oDatosTrans = TransaccionObtener(oTrans.GetTransId)
oConexion = oDatosTrans.Conexion
oraTrans = oDatosTrans.Trans
End If
' Rellenar propiedades del comando
cmdCommand.Connection = oConexion
cmdCommand.CommandText = sStoredProcedure
cmdCommand.CommandType = CommandType.StoredProcedure
'Cambio al usar el ODP: Ya no es necesario establecer la
'propiedad Transaction del objeto command, lo realiza automaticamente
'el objeto connection de Oracle
cmdCommand.Transaction = oraTrans
'Si se ha recibido un objeto de tipo ListaParametros
'se intenta cargar los parámetros en el objeto command
If (Not ListaParametros Is Nothing) Then
'carga los parámetros de la llamada en el objeto command
RellenaParametros(cmdCommand, ListaParametros)
End If
'Si la ejecución está fuera de una transacción, se abre una conexión
If oTrans Is Nothing Then
Abrir(oConexion)
End If
' Ejecutar comando
cmdCommand.ExecuteNonQuery()
'Si la ejecución está fuera de una transacción, se cierra una conexión
If oTrans Is Nothing Then
Cerrar(oConexion)
End If
'Actualiza los parámetros de salida modificados
' por el procedimiento almacenado
ActualizaParametrosSalida(ListaParametros, cmdCommand)
'Se liberan los recursos de base de datos usados
cmdCommand.Dispose()
Catch ex As Exception
'Al producirse un error, se realiza el cierre de la conexión
'Si la ejecución está fuera de una transacción
'de estar en una transacción, la conexión debe ser cerrada
'haciendo un rollback de la transacción
If oTrans Is Nothing Then
Cerrar(oConexion)
End If
'Se relanza la excepción
Throw ex
End Try
End Sub
Private Sub Cerrar(ByRef oConexion As OracleConnection)
' Cerrar conexion si está abierta
If oConexion.State = ConnectionState.Open Then
oConexion.Close()
'oConexion.Dispose()
oConexion.Dispose()
End If
End Sub
Thanks in advance.
I was able to get more info from the stack error, getting this:
[OverflowException: La operación aritmética ha provocado un desbordamiento.]
System.IntPtr.ToInt32() +37
CoreLab.Oracle.a6.a(b8[] A_0, Byte[] A_1) +542
CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3) +361
CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) +526
CoreLab.Oracle.OracleCommand.ExecuteNonQuery() +27
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros, TransaccionBD& oTrans) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1207
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1109
Web_Recipap.index.btnEntrar_Click(Object sender, ImageClickEventArgs e) in C:\Temporalx64\Recipap\WebUI\Home\index.aspx.vb:118
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +168
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215
So it appears that the problem is related to the call of the method ExecuteNonQuery in the procedure that I sent you.
UPDATE:
After installing the new version of CoreLab, the stack error is:
[OverflowException: La operación aritmética ha provocado un desbordamiento.]
System.IntPtr.ToInt32() +37
CoreLab.Oracle.a7.a(b8[] A_0, Byte[] A_1) +542
CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3) +361
CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) +526
CoreLab.Oracle.OracleCommand.ExecuteNonQuery() +27 BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros, TransaccionBD& oTrans) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1207
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1109
Web_Recipap.index.btnEntrar_Click(Object sender, ImageClickEventArgs e) in C:\Temporalx64\Recipap\WebUI\Home\index.aspx.vb:118
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +168
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215
Trying with another methods the stack error is:
[OverflowException: La operación aritmética ha provocado un desbordamiento.]
System.IntPtr.ToInt32() +37
CoreLab.Oracle.a7.a(b8[] A_0, Byte[] A_1) +542
CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3) +361
CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) +526
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +19
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +233
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +571
CoreLab.Oracle.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +317
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +173
BasesDeDatos.BaseDeDatos.ProcAlmacSelect(String sProcedAlmac, ListaParamsBD& ListaParametros, String sNombreCursor, Int32 iRegInicio, Int32 iRegMax, TransaccionBD& oTrans) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1072
BasesDeDatos.BaseDeDatos.ProcAlmacSelect(String sProcedAlmac, ListaParamsBD& ListaParametros) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:850
Web_Recipap.Informe.FillCmbActividad() in C:\Temporalx64\Recipap\WebUI\Informes\Informe.aspx.vb:383
Web_Recipap.Informe.Page_Load(Object sender, EventArgs e) in C:\Temporalx64\Recipap\WebUI\Informes\Informe.aspx.vb:136
System.Web.UI.Control.OnLoad(EventArgs e) +127
System.Web.UI.Control.LoadRecursive() +101
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2588
Testing in XP (x86) targeting to the same DB and using the same parameters everything works fine.
[OverflowException: La operación aritmética ha provocado un desbordamiento.]
System.IntPtr.ToInt32() +37
CoreLab.Oracle.a6.a(b8[] A_0, Byte[] A_1) +542
CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3) +361
CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) +526
CoreLab.Oracle.OracleCommand.ExecuteNonQuery() +27
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros, TransaccionBD& oTrans) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1207
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1109
Web_Recipap.index.btnEntrar_Click(Object sender, ImageClickEventArgs e) in C:\Temporalx64\Recipap\WebUI\Home\index.aspx.vb:118
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +168
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215
So it appears that the problem is related to the call of the method ExecuteNonQuery in the procedure that I sent you.
UPDATE:
After installing the new version of CoreLab, the stack error is:
[OverflowException: La operación aritmética ha provocado un desbordamiento.]
System.IntPtr.ToInt32() +37
CoreLab.Oracle.a7.a(b8[] A_0, Byte[] A_1) +542
CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3) +361
CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) +526
CoreLab.Oracle.OracleCommand.ExecuteNonQuery() +27 BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros, TransaccionBD& oTrans) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1207
BasesDeDatos.BaseDeDatos.ProcAlmacExecute(String sStoredProcedure, ListaParamsBD& ListaParametros) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1109
Web_Recipap.index.btnEntrar_Click(Object sender, ImageClickEventArgs e) in C:\Temporalx64\Recipap\WebUI\Home\index.aspx.vb:118
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +168
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215
Trying with another methods the stack error is:
[OverflowException: La operación aritmética ha provocado un desbordamiento.]
System.IntPtr.ToInt32() +37
CoreLab.Oracle.a7.a(b8[] A_0, Byte[] A_1) +542
CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3) +361
CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) +526
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +19
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +233
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +571
CoreLab.Oracle.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +317
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +173
BasesDeDatos.BaseDeDatos.ProcAlmacSelect(String sProcedAlmac, ListaParamsBD& ListaParametros, String sNombreCursor, Int32 iRegInicio, Int32 iRegMax, TransaccionBD& oTrans) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:1072
BasesDeDatos.BaseDeDatos.ProcAlmacSelect(String sProcedAlmac, ListaParamsBD& ListaParametros) in C:\Componentes_old\BaseDeDatosCoreLab\BaseDeDatos.vb:850
Web_Recipap.Informe.FillCmbActividad() in C:\Temporalx64\Recipap\WebUI\Informes\Informe.aspx.vb:383
Web_Recipap.Informe.Page_Load(Object sender, EventArgs e) in C:\Temporalx64\Recipap\WebUI\Informes\Informe.aspx.vb:136
System.Web.UI.Control.OnLoad(EventArgs e) +127
System.Web.UI.Control.LoadRecursive() +101
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2588
Testing in XP (x86) targeting to the same DB and using the same parameters everything works fine.
Hi Shalex
About our IIS machine:
Microsoft Windows Server 2003 R2
Enterprise x64 Edition Service Pack 2
Intel Core(TM)2 CPU
6600 @ 2.40 GHz
2.40 GHz, 2,00 GB de RAM
Also I include the info about the Oracle Server, as provided by your Connection object:
ServerVersion "Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options"
Thanks, we are very scared about this since we almost ended the migration and need to deploy them
Ernesto
About our IIS machine:
Microsoft Windows Server 2003 R2
Enterprise x64 Edition Service Pack 2
Intel Core(TM)2 CPU
6600 @ 2.40 GHz
2.40 GHz, 2,00 GB de RAM
Also I include the info about the Oracle Server, as provided by your Connection object:
ServerVersion "Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options"
Thanks, we are very scared about this since we almost ended the migration and need to deploy them
Ernesto