logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Key cannot be null error
Date Fri, 22 May 2009 01:05:22 GMT
Are you sure you're providing a valid connection string property? The latest source code contains
this code:

                // Sadly, your connection string is bad.
                ErrorHandler.Error("Could not open database connection [" + resolvedConnectionString
+ "]. Connection string context [" + connectionStringContext + "].", e);

which seems to match your error message.

Can you paste your appender node to the list?

From: Gary Cooper <lewd_reveller@yahoo.co.uk>
To: Log4NET User <log4net-user@logging.apache.org>
Sent: Thursday, May 21, 2009 4:57:14 PM
Subject: Re: Key cannot be null error

Thanks for your replies Karim & Radovan.
I have attempted to track down the problem with the log4net source, but this doesnt seem to
have yielded much success. I am thinking that this could possibly be an error with MySql connector
as opposed to log4net, after all this doesnt seem to be happening with SQL Server or Oracle
(or at least it isnt being reported).
Karim, I think I followed your example on DevShed concerning this setup, I would like to thankyou
for putting that together and I look forward to reading your blog article on this, I hope
one of us will be able to overcome this problem - unfortunately, I dont have access to another
DB to test this out on, but it would be nice to hear back from someone using the same code
with Oracle or SQL Server.

 From: Karim Bourouba <karym6@hotmail.com>
To: log4net-user@logging.apache.org
Sent: Thursday, 21 May, 2009 11:52:56
Subject: RE: Key cannot be null error

 Hi Radovan,
thats a great idea, I will give it a go and report back. Many thanks


 Subject: RE: Key cannot be null error
Date: Thu, 21 May 2009 12:43:15 +0200
From: raszka@hasam.cz
To: log4net-user@logging.apache.org

you can try this:
download log4net sources and attach them to your project instead of reference to log4net.dll.
Now you'll be able to debug inside of AdonetAppender and you can find what exactly is null
and guess the correct value, I hope.
Radovan Raszka

 Od: Karim Bourouba [mailto:karym6@hotmail.com] 
Odesláno: 21. května 2009 10:43
Komu: log4net-user@logging.apache.org
Předmět: RE: Key cannot be null error

Hi Gary,
I am actually having the same problem as you - I think. I definitely get the same error as
you. Can I ask if you are using MySql at all?
Unfortunately though, I havent had any luck with asking this question on this list, it would
appear that the list is not as busy as I thought it initially was, or the other subscribers
are unable to comment.
To help you with your problem, if it isnt the same as mine, would be to post your code on
the list itself. That gives everyone the chance to take a look and see if they can spot the
If you do have the same problem as me, could you post your solution should you fix it? That
way others, including myself will be able to resolve this in future.

 Date: Wed, 20 May 2009 22:02:14 +0000
From: lewd_reveller@yahoo.co.uk
Subject: Key cannot be null error
To: log4net-user@logging.apache.org

Could someone explain to me what the following error means please?
log4net:ERROR [AdoNetAppender] Could not open database connection []
System.ArgumentNullException: Key cannot be null.
Parameter name: key
I encounter this error when trying to log to my database. The rows are updated, but I get
this message pop up on the console. I dont know how busy this list is, but I would really
appreciate it if someone could lend a hand.

 Share your photos with Windows Live Photos - Free. Try it Now!
 Windows Live Messenger just got better. Find out more! 

View raw message