This project is read-only.

Sudden nullReference in LoggingModule

Topics: Core, General, Troubleshooting
Dec 6, 2011 at 9:33 AM
Edited Dec 6, 2011 at 9:53 AM

This morning i was just testing our website and suddenly i'm gettting a nullreference exception:

System.NullReferenceException: Object reference not set to an instance of an object.

Orchard\Logging\LoggingModule.cs    Line: 65

var logger = _loggerCache.GetOrAdd(component, key => ctx.Resolve<ILogger>(new TypedParameter(typeof(Type), componentType)));

when i catch the exception i see that context.Chain is null in

private static void Preparing(ThreadContext context, PreparingEventArgs preparing) {

in ContainerSpy.cs Orchard.Experimental.ContainerSpy

Does anybody know what's wrong?

Dec 9, 2011 at 2:57 AM

What's Orchard.Experimental.ContainerSpy?

Dec 13, 2011 at 1:21 PM

well it's part of the Orchard.Experimental module. To get the site working again i deleted this module from my modules folder. But i don't like that i can't use this module anymore.

Dec 13, 2011 at 5:13 PM

Yeah, well, experimental is experimental. Maybe you can isolate the code that you need from there and make it a different module.

Dec 14, 2011 at 7:31 AM

yes i understand but i hoped that someone knew what the problem is because i haven't done any changes to it.

Dec 14, 2011 at 7:32 AM

Sorry, I don't.