OracleClient.DBObjectPool.GetObject ERROR

G

Guest

Hi

We are getting the following exceptio

System.NullReferenceException: Object reference not set to an instance of an object
at System.Data.OracleClient.DBObjectPool.GetObject(Object owningObject, Boolean& isInTransaction
at System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection(String encryptedConnectionString, OracleConnectionString options, OracleConnection owningObject, Boolean& isInTransaction
at System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionString parsedConnectionString, Object transact
at System.Data.OracleClient.OracleConnection.Open(
at MRGRID.DataAccess.DbManager.OpenConnTrans(
at MRGRID.BO.Publication.Publication.InsertMDD(Int32 dataID, String mddPath

This is a batch process application, it reads files from the file system, processes them and inserts them into the database. The processing is done by a third party DLL which consumes a lot of time and it also inserts data into Oracle - some parts of this DLL seems to be .NET based and some part seems to be COM based.

The issue is that, our batch process application, processes the first couple of files perfectly and then throws up this error. This error consistently happens after this third party DLL has done its work and then when the control is handed back to our batch process application, it again tries to open a connection and finish up some additional tasks. As I mentioned, this exact same code path works for the first couple of files and then the application encounters this error

We are using .NET Framework 1.1 / the version of System.Data.OracleClient.dll is 1.1.4322.573 / and the Oracle DB Server is ver. 9.2

The connection string we are using is like this

Data Source=ORACLEDB92;User ID=MRG;Password=PW

I have tried as many combinations as I can - I tried GC.Collect, con.Close() and con.Dispose() etc. Still almost the same issue

The sessions monitor shows hardly 2 or 3 connections around the time we encounter this error

Any ideas??

Thank
Dhwanil
 
G

Guest

Hi

An update - If I disable connection pooling through the connection string, I am getting the following error in the exact same scenario -

System.NullReferenceException: Object reference not set to an instance of an object
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
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(
at MRGRID.DataAccess.DbManager.OpenConnTrans(
at MRGRID.BO.Publication.Publication.InsertMDD(Int32 dataID, String mddPath
at MRGRID.Services.Data.Upload.StoreMetadata(UploadValuesClass& vals, String projID

Dhwanil
 
G

Guest

Hi

I am not sure why this problem is occuring and there seems to be very less material available on the net regarding this!!

We were able to resolve the problem by increasing the Connection Timeout and by setting the Min and Max Pool Size in the connection string

Hope this gets fixed in the next release from MS

Dhwanil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top