huxi / lilith

Lilith is a Logging- and AccessEvent viewer for Logback, log4j, log4j2 and java.util.logging
http://lilith.huxhorn.de
GNU Lesser General Public License v3.0
137 stars 18 forks source link

NullPointerException logging Error with log4j2 socket appender with version 8.0.1 #22

Closed taorg closed 9 years ago

taorg commented 9 years ago

We think we've found another bug. This peace of code :

      try  {
                throw new UnsupportedOperationException();
            } catch( Exception ex ) {
                getLogger().error( ex.getMessage(), ex );
            }

would not be registered by Lilith and produce the following error :

java.lang.NullPointerException at de.huxhorn.lilith.data.logging.protobuf.generated.LoggingProto$Message$Builder.setMessagePattern(LoggingProto.java:6585) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na] at de.huxhorn.lilith.data.logging.protobuf.LoggingEventProtobufEncoder.convert(LoggingEventProtobufEncoder.java:269) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na] at de.huxhorn.lilith.data.logging.protobuf.LoggingEventProtobufEncoder.convert(LoggingEventProtobufEncoder.java:499) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na] at de.huxhorn.lilith.data.logging.protobuf.LoggingEventWrapperProtobufEncoder.convert(LoggingEventWrapperProtobufEncoder.java:117) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na] at de.huxhorn.lilith.data.logging.protobuf.LoggingEventWrapperProtobufEncoder.encode(LoggingEventWrapperProtobufEncoder.java:70) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na] at de.huxhorn.lilith.data.logging.protobuf.LoggingEventWrapperProtobufEncoder.encode(LoggingEventWrapperProtobufEncoder.java:48) ~[de.huxhorn.lilith.data.logging.protobuf-8.0.1-SNAPSHOT.jar:na] at de.huxhorn.sulky.codec.DelegatingCodecBase.encode(DelegatingCodecBase.java:80) ~[de.huxhorn.sulky.codec-8.0.1-20151127.230227-2.jar:na] at de.huxhorn.sulky.codec.filebuffer.DefaultDataStrategy.internalWriteElement(DefaultDataStrategy.java:143) ~[de.huxhorn.sulky.codec.filebuffer-8.0.1-20151127.230228-2.jar:na] at de.huxhorn.sulky.codec.filebuffer.DefaultDataStrategy.addAll(DefaultDataStrategy.java:88) ~[de.huxhorn.sulky.codec.filebuffer-8.0.1-20151127.230228-2.jar:na] at de.huxhorn.sulky.codec.filebuffer.CodecFileBuffer.addAll(CodecFileBuffer.java:476) ~[de.huxhorn.sulky.codec.filebuffer-8.0.1-20151127.230228-2.jar:na] at de.huxhorn.lilith.eventhandlers.FileDumpEventHandler.handle(FileDumpEventHandler.java:51) [de.huxhorn.lilith-8.0.1-SNAPSHOT.jar:na] at de.huxhorn.lilith.engine.impl.sourcemanager.EventPoller.run(EventPoller.java:97) [de.huxhorn.lilith.engine-8.0.1-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66]

huxi commented 9 years ago

Fixed. Thanks for the feedback. Really appreciated.

taorg commented 9 years ago

You are welcome. Thank you.