Connection pooling and internal OracleType cash.

Connection pooling and internal OracleType cash.

Postby DataKeeper » Wed 25 Jul 2007 07:34

I get random exception when Connection pooling works.

Exception.Message:
{"Object reference not set to an instance of an object."}

StackTrace:
Code: Select all
   at CoreLab.Oracle.OracleObject.set_IsNull(Boolean value)
   at CoreLab.Oracle.OracleObject.a(NativeOracleObject A_0)
   at CoreLab.Oracle.OracleObject.a(NativeOracleObject A_0)
   at CoreLab.Oracle.OracleParameter.a(OracleDbType A_0, Object A_1, Type& A_2, Object& A_3, Byte[] A_4, Int32 A_5, Int32 A_6, Int32 A_7, Int32 A_8, Boolean A_9, Boolean A_10, OracleCommand A_11, ParameterDirection A_12, bd A_13)
   at CoreLab.Oracle.OracleParameter.a(b0& A_0, Boolean A_1, Boolean A_2, OracleCommand A_3, Byte[] A_4, bd A_5)
   at CoreLab.Oracle.OracleCommand.a(OracleParameterCollection A_0, b0[] A_1, ar A_2, bd A_3)
   at CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
   at CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at CoreLab.Oracle.OracleCommand.ExecuteNonQuery()
   at OracleContextor.ConnectionFactory.ExecProc(String storedProcedureName, CommandParameterCollection parameters)


TargerSite:
{Name = "OracleObject" FullName = "CoreLab.Oracle.OracleObject"}
{Void set_IsNull(Boolean)}


I suppose that is is related with internal OracleType cash may be, because after this exception OracleType is illegal reported such oracleType.DbType is 0 (illegal type).
This repeats until OracleConnection.ClearAllPools() was called.

This Code repair error:
Code: Select all
OracleType oracleType = OracleType.GetObjectType(typeName, oracleConnection);
oracleType.Describe(oracleTransaction.Connection);
GC.SuppressFinalize(oracleType);
GC.KeepAlive(oracleType);


but not at all. Just decrease appearance frequency of exceptions.

Using non Pool connection is not workable for me, I need Pooling.
CoreLab.Oracle - V4.20.16.0
Thanks
DataKeeper
 
Posts: 8
Joined: Fri 23 Mar 2007 13:43

Postby Alexey » Wed 25 Jul 2007 08:02

Could you send me a test project to reproduce the problem?
Use e-mail address provided in the Readme file.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby DataKeeper » Mon 03 Sep 2007 09:32

Many thanks,
version 4.20.20.0 fixed problem.

Except some times on the first concurrent run I get (only one time), but this is not a problem.

Code: Select all
Exception #:1 ~~~~~~~~~~ Cannot convert object of type 'System.Object' to object of type 'CoreLab.Oracle.OracleObject'. ~~~~~~~~~~
   at CoreLab.Common.g.a(Byte[] A_0, Int32 A_1, Object A_2)
   at CoreLab.Oracle.bw.a(Byte[] A_0, Int32 A_1, Object A_2)
   at CoreLab.Oracle.OracleParameter.a(OracleDbType A_0, Object A_1, Byte[] A_2, Int32 A_3, Int32 A_4, Int32 A_5, Int32 A_6, Int32 A_7, Boolean A_8, Boolean A_9, OracleCommand A_10, ParameterDirection A_11, String A_12, ap A_13, Boolean& A_14)
   at CoreLab.Oracle.OracleParameter.a(b2& A_0, Boolean A_1, Boolean A_2, OracleCommand A_3, Byte[] A_4, ap A_5, Boolean& A_6)
   at CoreLab.Oracle.OracleCommand.a(Int32 A_0, OracleParameterCollection A_1, ap A_2, Boolean& A_3)
   at CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
   at CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at CoreLab.Oracle.OracleCommand.ExecuteNonQuery()
   at CrLabDemo.MainForm.ThreadBody(Object threadStateObject) in E:\Temp\CorelabDemo\CrLabDemo\CrLabDemo\MainForm.cs:line 74
DataKeeper
 
Posts: 8
Joined: Fri 23 Mar 2007 13:43

Postby Alexey » Thu 06 Sep 2007 10:40

I need your database objects to investigate the problem. Please send me the script.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle