[ 
https://issues.apache.org/jira/browse/LOG4NET-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17041960#comment-17041960
 ] 

Hemanth Sankepally commented on LOG4NET-581:
--------------------------------------------

I ran into this issue, from out of no where. It worked fine in the same setup 
couple of weeks ago but suddenly when I created the Logger package (log4net 
based logger with custom appenders) and installed it into my project setup one 
of the lower class libraries isn't able to resolve the dependency. we use 
servicelocator pattern to resolve and ninject straight away complains with this 
exact nullreference exception!

I/we just don't get what is going on.!

> NullReferenceException from 
> log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData
> -----------------------------------------------------------------------------------
>
>                 Key: LOG4NET-581
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-581
>             Project: Log4net
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.0.8
>         Environment: Windows Server 2012R
>            Reporter: Vlad Lee
>            Assignee: Dominik Psenner
>            Priority: Major
>              Labels: patch
>             Fix For: 2.1.0
>
>         Attachments: ReadOnlyPropertiesDictionary.cs
>
>
> Hello,
> Below is the full exception stack. Exception happens because entryValue is 
> null, so attempt to get IsSerializable attribute from GetType() was failing. 
> Updated file is attached, this works for us now. Let me know if you have 
> questions.
> Thank you,
> Vlad
> System.NullReferenceException: Object reference not set to an instance of an 
> object.
> Server stack trace: 
>    at System.Object.GetType()
>    at 
> log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(SerializationInfo 
> info, StreamingContext context)
>    at 
> System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object
>  obj, ISurrogateSelector surrogateSelector, StreamingContext context, 
> SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, 
> ObjectWriter objectWriter, SerializationBinder binder)
>    at 
> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo
>  objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
>    at 
> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object 
> graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
>    at 
> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream
>  serializationStream, Object graph, Header[] headers, Boolean fCheck)
>    at 
> System.Runtime.Remoting.Channels.BinaryServerFormatterSink.SerializeResponse(IServerResponseChannelSinkStack
>  sinkStack, IMessage msg, ITransportHeaders& headers, Stream& stream)
>    at 
> System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack
>  sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream 
> requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, 
> Stream& responseStream)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to