DB2 - Problem description
Problem IC77550 | Status: Closed |
.NET EXCEPTION IS THROWN WHEN DB2.NET TRACE IS ENABLED | |
product: | |
DB2 FOR LUW / DB2FORLUW / 980 - DB2 | |
Problem description: | |
Enabling a DB2.NET Trace via the environment variables DB2NMPTRACE and DB2NMPCONSOLE will cause a System.ObjectDisposedException to be thrown, with the following call stack: at System.IO.__Error.WriterClosed()\r\n at System.IO.StringWriter.Write(Char[] buffer, Int32 index, Int32 count)\r\n at System.IO.TextWriter.WriteLine(String value)\r\n at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)\r\n at System.Console.WriteLine(String value)\r\n at IBM.Data.DB2.DB2Trace.ApiEntry(Int32 uiTraceFunction)\r\n at IBM.Data.DB2.DB2Connection.ResetConnPoolRef()\r\n at IBM.Data.DB2.DB2ConnPool.FreeDB2ConnPool()\r\n at IBM.Data.DB2.DB2ConnPool.Finalize() The trace itself will still be created and the application will work as usual, however an exception gets thrown by the DB2.NET data provider when the trace is enabled and that should not be the case. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * Enabling a DB2.NET Trace via the environment variables * * DB2NMPTRACE and DB2NMPCONSOLE will cause a * * System.ObjectDisposedException to be thrown, with the * * following call stack: * * * * at System.IO.__Error.WriterClosed()\r\n * * at System.IO.StringWriter.Write(Char[] buffer, Int32 index, * * Int32 count)\r\n * * at System.IO.TextWriter.WriteLine(String value)\r\n * * at System.IO.TextWriter.SyncTextWriter.WriteLine(String * * value)\r\n * * at System.Console.WriteLine(String value)\r\n * * at IBM.Data.DB2.DB2Trace.ApiEntry(Int32 uiTraceFunction)\r\n * * at IBM.Data.DB2.DB2Connection.ResetConnPoolRef()\r\n * * at IBM.Data.DB2.DB2ConnPool.FreeDB2ConnPool()\r\n * * at IBM.Data.DB2.DB2ConnPool.Finalize() * * * * The trace itself will still be created and the application * * will work as usual, however an exception gets thrown by the * * DB2.NET data provider when the trace is enabled and that * * should not be the case. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.8, Fixpak 4 * **************************************************************** | |
Local Fix: | |
The error for the most part can be ignored. However to prevent the exception from occurring you can keep DB2NMPTRACE=1 set, but unset DB2NMPCONSOLE and take a trace by piping the results to a file. This will only work if the application is a stand alone executable that can be invoked from a command prompt. For example: testconn20.exe "database=sample;" > nmptrace.txt | |
available fix packs: | |
DB2 Version 9.8 Fix Pack 4 for AIX and Linux | |
Solution | |
First fixed in DB2 Version 9.8, Fixpak 4 | |
Workaround | |
see Local Fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 15.07.2011 17.08.2011 17.08.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.8. | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.8.0.4 |