Object reference not set to an instance of an object.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
John
Posts: 25
Joined: Fri 12 Nov 2004 21:18
Location: Durham, NC, USA

Object reference not set to an instance of an object.

Post by John » Mon 07 Mar 2005 19:17

Hi;

We are experiencing an intermittent exception "object reference not set to an instance of an object" that is thrown by OraDirect .NET (v2.5) when our our C# (.NET v1.1) application makes stored procedure calls to our Oracle 8i database. We were unable to find any problems with our application or with the stored procedure. After running a stack trace on the exception we are led to believe that the problem is in the OraDirect driver. I have included the stack track below. I would greatly appreciate any help.

Thanks!


John


Stack Trace =
at DynamicType.nativeOCIEnvCreate(IntPtr& , UInt32 , IntPtr , IntPtr , IntPtr , IntPtr , UInt32 , UInt32 )
at DynamicType.OCIEnvCreate(IntPtr& , UInt32 , IntPtr , IntPtr , IntPtr , IntPtr , UInt32 , UInt32 )
at a.c.q.l()
at a.c.q..ctor(Boolean A_0, Boolean A_1, Boolean A_2)
at a.c.d..ctor(i A_0)
at a.c.k.a(DbConnectionOptions A_0, Object A_1, DbConnectionBase A_2)
at CoreLab.Common.DbConnectionFactory.a(DbConnectionBase A_0, DbConnectionOptions A_1)
at CoreLab.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at CoreLab.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at CoreLab.Common.DbConnectionBase.Open()
at CoreLab.Oracle.OracleConnection.Open()

John
Posts: 25
Joined: Fri 12 Nov 2004 21:18
Location: Durham, NC, USA

Object reference not set to an instance of an object.

Post by John » Mon 07 Mar 2005 19:20

I have also seen the following stack trace for the same error.

Stack Trace =
at a.c.d.g()
at a.c.d..ctor(i A_0)
at a.c.k.a(DbConnectionOptions A_0, Object A_1, DbConnectionBase A_2)
at CoreLab.Common.DbConnectionFactory.a(DbConnectionBase A_0, DbConnectionOptions A_1)
at CoreLab.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at CoreLab.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at CoreLab.Common.DbConnectionBase.Open()
at CoreLab.Oracle.OracleConnection.Open()

John
Posts: 25
Joined: Fri 12 Nov 2004 21:18
Location: Durham, NC, USA

Object reference not set to an instance of an object.

Post by John » Wed 09 Mar 2005 14:05

Another (slightly different) stack trace for the same error.

Stack Trace =
at DynamicType.nativeOCIHandleFree(HandleRef , UInt32 )
at DynamicType.OCIHandleFree(HandleRef , UInt32 )
at a.c.q.f()
at a.c.d..ctor(i A_0)
at a.c.k.a(DbConnectionOptions A_0, Object A_1, DbConnectionBase A_2)
at CoreLab.Common.DbConnectionFactory.a(DbConnectionBase A_0, DbConnectionOptions A_1)
at CoreLab.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at CoreLab.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at CoreLab.Common.DbConnectionBase.Open()
at CoreLab.Oracle.OracleConnection.Open()

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Post by Oleg » Wed 09 Mar 2005 15:48

Please specify how often this error with opening a connection happens at you (always or sometimes).
Probably this topic help you to solve the problem http://www.error-bank.com/microsoft.pub ... hread.aspx
Or send us a value of your environment variable PATH, and registry key HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE.

John
Posts: 25
Joined: Fri 12 Nov 2004 21:18
Location: Durham, NC, USA

Object reference not set to an instance of an object

Post by John » Thu 10 Mar 2005 18:10

The application crashes about once ever six hours (or aproximatly once per 50 stored procedure calls). Unfortunatly, these reccomendations do not help because the problem is not that OCI cannot be loaded or found. The stack trace seems to indicate that the problem is in the OraDirect driver or the OCI dll.


HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE

API - c:\oracle\ora90\dbs
inst_loc - C:\Program Files\Oracle\Inventory
ORACLE_GROUP_NAME - Oracle - OraHome90
ORACLE_HOME - c:\oracle\ora90
ORACLE_HOME_NAME - OraHome90

Post Reply