Thank you. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Marshall Pierce Sent: Wednesday, June 06, 2012 3:43 PM To: logback users list Subject: Re: [logback-user] stack trace does not print - sometimes
The JVM can omit stack traces if the exception is thrown frequently. See http://stackoverflow.com/questions/4659151/recurring-exception-without-a-sta ck-trace-how-to-reset and the penultimate bullet point in http://java.sun.com/j2se/1.5.0/relnotes.html#hotspot for more info. -Marshall On 2012 Jun 6, at 12:19 PM, David Tkaczyk wrote: > 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 > > _______________________________________________ > Logback-user mailing list > [email protected] > http://mailman.qos.ch/mailman/listinfo/logback-user _______________________________________________ Logback-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-user _______________________________________________ Logback-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-user
