You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by depsi programmer <de...@yahoo.com> on 2005/10/04 06:39:47 UTC

TypeInitializationException was unhandled

Hi

I am getting following error in log4.net

The exact error message and stack trace:

System.TypeInitializationException was unhandled

 Message="The type initializer for
'log4net.Core.LoggerManager' threw an exception."

 Source="log4net"

 TypeName="log4net.Core.LoggerManager"

 StackTrace:

      at
log4net.Core.LoggerManager.GetRepository(Assembly
repositoryAssembly)

      at log4net.LogManager.GetRepository(Assembly
repositoryAssembly)

      at log4net.Config.XmlConfigurator.Configure()
     
      at System.Windows.Forms.Form.OnLoad(EventArgs e)

      at System.Windows.Forms.Form.OnCreateControl()

      at
System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)

      at System.Windows.Forms.Control.CreateControl()

      at
System.Windows.Forms.Control.WmShowWindow(Message& m)

      at System.Windows.Forms.Control.WndProc(Message&
m)

      at
System.Windows.Forms.ScrollableControl.WndProc(Message&
m)

      at
System.Windows.Forms.ContainerControl.WndProc(Message&
m)

      at
System.Windows.Forms.Form.WmShowWindow(Message& m)

      at System.Windows.Forms.Form.WndProc(Message& m)

      at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
m)

      at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)

      at
System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

      at
System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef
hWnd, Int32 msg, Int32 wParam, Int32 lParam)

      at
System.Windows.Forms.Form.SetVisibleCore(Boolean
value)

      at
System.Windows.Forms.Control.set_Visible(Boolean
value)

      at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)

      at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)

      at System.Windows.Forms.Application.Run(Form
mainForm)

      at System.AppDomain.nExecuteAssembly(Assembly
assembly, String[] args)

      at System.AppDomain.ExecuteAssembly(String
assemblyFile, Evidence assemblySecurity, String[]
args)

      at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

      at
System.Threading.ThreadHelper.ThreadStart_Context(Object
state)

      at
System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object
state)

      at System.Threading.ThreadHelper.ThreadStart() 

When I checked the inner exception it was 

The inner exception is
The type initializer for 'log4net.Core.LoggerManager'
threw an exception.
Stack Trace is
  at log4net.Core.LoggerManager.GetRepository(Assembly
repositoryAssembly)
  at log4net.LogManager.GetRepository(Assembly
repositoryAssembly)
  at log4net.Config.XmlConfigurator.Configure()
  at xyz.FrmMain.Form1_Load(Object sender, EventArgs
e) in xyz.vb:line 147
  at System.Windows.Forms.Form.OnLoad(EventArgs e)
  at System.Windows.Forms.Form.OnCreateControl()
  at
System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
  at System.Windows.Forms.Control.CreateControl()
  at
System.Windows.Forms.Control.WmShowWindow(Message& m)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at
System.Windows.Forms.ScrollableControl.WndProc(Message&
m)
  at
System.Windows.Forms.ContainerControl.WndProc(Message&
m)
  at System.Windows.Forms.Form.WmShowWindow(Message&
m)
  at System.Windows.Forms.Form.WndProc(Message& m)
  at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
m)
  at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
  at
System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  at
System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef
hWnd, Int32 msg, Int32 wParam, Int32 lParam)
  at System.Windows.Forms.Form.SetVisibleCore(Boolean
value)
  at System.Windows.Forms.Control.set_Visible(Boolean
value)
  at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
  at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
  at System.Windows.Forms.Application.Run(Form
mainForm)
  at System.AppDomain.nExecuteAssembly(Assembly
assembly, String[] args)
  at System.AppDomain.ExecuteAssembly(String
assemblyFile, Evidence assemblySecurity, String[]
args)
  at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
  at
System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
  at
System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object
state)
  at System.Threading.ThreadHelper.ThreadStart() 


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com