[logback-user] stack trace does not print - sometimes

David Tkaczyk djt69b at gmail.com
Wed Jun 6 21:19:33 CEST 2012


Hi,

 

I have a situation where the same line of code in some cases produces a
stack trace and in other cases does not.  I have not been able to reproduce
this in a unit test.  Has anyone ever seen this?

 

I'm using this pattern:   <pattern>%date{yyyy-MM-dd HH:mm:ss.SSS}
%-6camlevel [%thread] %class.%method:%line - %message %mdc%n</pattern>

 

Here's the offending line of code - 581:

 

          logger.warn(

              MessageFormatter.format("Rejecting {} due to error: ", object)

                  .getMessage(), exc);

 

"object" is an Object and "exc" is an Exception

 

Example w/o stack trace:

2012-06-06 04:10:25.616 WARN   [DiameterEnfManager8]
msc.rc.diameter.DiameterEnfManager.handleObject:581 - Rejecting CREATE
SessionId=seagull_gx;atcaa;b;c;d Subscriber=[IMSI:xxxxxxxx, IP:yyyyyyyyyy]
due to error:

java.lang.NullPointerException: null

 

Example w/ stack trace:

2012-06-06 04:14:18.727 WARN   [DiameterEnfManager2]
msc.rc.diameter.DiameterEnfManager.handleObject:581 - Rejecting REAUTHACK
SessionId=seagull_gxx;atca Subscriber=[IP:aaaaa, IMSI:zzzzzzzzzzzzzzzzz] due
to error:

java.util.ConcurrentModificationException: null

        at
java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
~[na:1.7.0_02]

        at java.util.ArrayList$Itr.next(ArrayList.java:791) ~[na:1.7.0_02]

        at
msc.rc.model.ObjectFactory.getSessionAltKeys(ObjectFactory.java:4024)
~[msc.jar:na]

        at
msc.rc.diameter.model.DiameterObjectFactory.saveSession(DiameterObjectFactor
y.java:752) ~[msc.jar:na]

        at
msc.rc.diameter.DiameterManager.saveSession(DiameterManager.java:595)
~[msc.jar:na]

        at
msc.rc.diameter.DiameterManager.handleAck(DiameterManager.java:732)
~[msc.jar:na]

        at
msc.rc.diameter.DiameterEnfManager.handleAck(DiameterEnfManager.java:3854)
~[msc.jar:na]

        at
msc.rc.diameter.DiameterEnfManager.handleObject(DiameterEnfManager.java:527)
~[msc.jar:na]

        at
msc.rc.framework.HandlerThreadTracker.handleObject(HandlerThreadTracker.java
:51) [msc.jar:na]

        at
msc.rc.framework.QueueHandlerThread.run(QueueHandlerThread.java:103)
[msc.jar:na]

        at
abc.util.thread.ManagedThread$ExceptionHandler.run(ManagedThread.java:230)
[camiant-platform.jar:na]

        at java.lang.Thread.run(Thread.java:722) [na:1.7.0_02]

 

Thanks,

Dave

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120606/769ff8fe/attachment.html>


More information about the Logback-user mailing list