Null Reference Exception In System.Data.OracleClient Method?!
574510Apr 25 2007 — edited May 2 2007Hi all,
I'm having issues connecting to an Oracle 9i database using ASP.NET
1.1. The following sequence causes a problem:
- webpage A opens webpage B which logs an entry in the DB
- webpage B generates a Crystal Report
- webpage B logs a second entry in the DB
Webpage A remains open throughout this process. Webpage B opens
(via System.Data.OracleClient.OracleConnection.Open()) a connection to
the database when starting each logging process. The connection is
immediately Closed() once this is done.
The first time through, this sequence works fine. However, the second
time through, ASP hangs indefinitely until its process is killed using
Windows XP's Task Manager. I debugged this down to an "Object
reference not set to an instance of an object" exception thrown in the
following call stack:
at
System.Data.OracleClient.UnsafeNativeMethods.OCIServerAttach(HandleRef
srvhp, HandleRef errhp, Byte[] dblink, Int32 dblink_len, MODE mode)
at
System.Data.OracleClient.TracedNativeMethods.OCIServerAttach(OciHandle
srvhp, OciHandle errhp, String dblink, Int32 dblink_len, MODE mode)
at
System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String
userName, String password, String serverName, Boolean
integratedSecurity, Boolean unicode, Boolean
workaroundOracleBug914652)
at System.Data.OracleClient.OracleInternalConnection.Open(Object
transact)
at
System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString
connectionOptions, Object transact)
at
System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionString
parsedConnectionString, Object transact)
at System.Data.OracleClient.OracleConnection.Open()
Is this familiar to anyone? If so, do you know of any causes or
potential solutions? Do I chalk this down as a Microsoft or Oracle bug?
I found a post detailing a similar problem here:
http://www.dotnet247.com/247reference/msgs/50/252135.aspx
Unfortunately the user's proposed solution does not work.
Thanks.