Bugreport: NullReferenceExpetion when using dotConnect for Oracle 9.14 with the ADO.Net appender from log4net

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
marcwittke
Posts: 4
Joined: Tue 30 Oct 2018 09:42

Bugreport: NullReferenceExpetion when using dotConnect for Oracle 9.14 with the ADO.Net appender from log4net

Post by marcwittke » Tue 05 Jul 2022 21:02

When using dotconnect for Oracle as ADO.Net appender from log4net, a NullReferenceException is thrown when the log event does not have an exception and the event also doesn't get logged to the database table

Code: Select all

log4net:ERROR [AdoNetAppender] ErrorCode: GenericFailure. Exception while writing to database
System.NullReferenceException: Object reference not set to an instance of an object.
   at Devart.Data.Oracle.c9.a(aq A_0, Int32 A_1)
   at Devart.Data.Oracle.c9.a(Int32 A_0, eu A_1)
   at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
   at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
   at log4net.Appender.AdoNetAppender.SendBuffer(IDbTransaction dbTran, LoggingEvent[] events)
   at log4net.Appender.AdoNetAppender.SendBuffer(LoggingEvent[] events)
Full repo can be found here https://github.com/marcwittke/Devart-Log4Net . Also proof that ODP.Net does not have this issue. I started to notice this behavior after upgrading from 9.4


DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Bugreport: NullReferenceExpetion when using dotConnect for Oracle 9.14 with the ADO.Net appender from log4net

Post by DmitryGm » Tue 04 Oct 2022 07:44

Since you create .NET Framework project, you should use local assemblies (Devart.Data.dll, Devart.Data.Oracle.dll) shipped with the installation of dotConnect for Oracle (not a NuGet).

Post Reply