Results 1 to 3 of 3
  1. #1
    vmb1967 is offline Member
    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    Question Log4j disables stack trace after exception repetition

    Hi fellows!

    Our application uses Log4j-1.2.15 and is deployed at Tomcat-5.5.

    Due to an error at production job, an exception was logged several times.
    The odd is that the exception, after some repetitions, began to be logged without the stack trace.

    Java Code:
    2009-06-24 11:58:17,695 ERROR [Thread-47] ...
    java.lang.NullPointerException
    	at br.com.neolog.model.occurrence.LoadDataLog.<init>(LoadDataLog.java:33)
    	at br.com.neolog.model.occurrence.CurrentTransactionLoadedLoadRegister.registerLoad(CurrentTransactionLoadedLoadRegister.java:47)
    	at br.com.neolog.model.occurrence.LoadChangeOccurenceHibernateEventListener.onPostLoad(LoadChangeOccurenceHibernateEventListener.java:30)
    	at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:221)
    	
    	...
    	after some repetitions stack trace is being omitted
    	...
    	
    2009-06-24 12:12:50,932 ERROR [Thread-286] ...
    java.lang.NullPointerException
    2009-06-24 12:12:51,947 ERROR [Thread-286] ...
    java.lang.NullPointerException
    2009-06-24 12:12:52,227 ERROR [Thread-286] ...
    java.lang.NullPointerException
    2009-06-24 12:12:55,572 ....
    ...

    This occurred twice, with different exceptions and in different appenders.

    We can't reproduce this situation at development environment (thousands of repetitions and all stack traces were logged).

    Is there some configuration or property in Log4j (or Tomcat) that disables stack trace after some repetitions for a particular exception?

    Thanks in advance!
    vmb

  2. #2
    kai1968 is offline Member
    Join Date
    Jul 2009
    Posts
    1
    Rep Power
    0

    Default It's not log4j it's java

    I got an answer (stackoverflow.com/questions/1142007/why-does-log4j-disable-stack-trace-after-lots-of-repetition-of-the-same-excepti) to a similar question (lot more repetitions). Maybe that adresses your problem as well.

  3. #3
    vmb1967 is offline Member
    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    Talking jvm optimization

    Thank you very much for you replay KAI!

    This is an jvm optimization, when running in "server" mode - that's why I couldn't reproduce it in development.

Similar Threads

  1. while Loop (Repetition) structure.
    By gapeach97 in forum New To Java
    Replies: 9
    Last Post: 12-04-2008, 12:52 AM
  2. if any user disables the browser's scripting execution then how can I know?
    By vishnujava in forum JavaServer Pages (JSP) and JSTL
    Replies: 5
    Last Post: 08-06-2008, 07:21 PM
  3. Exception: max stack exceeded
    By ourip in forum Threads and Synchronization
    Replies: 4
    Last Post: 05-27-2008, 11:05 PM
  4. repetition of 'arguments'(?)
    By Igor in forum New To Java
    Replies: 3
    Last Post: 12-13-2007, 11:08 AM
  5. Stack Trace
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-10-2007, 06:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •