Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3672450
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:36:37+00:00 2026-05-19T02:36:37+00:00

In my application log (using log4j), I see a NullPointerException, but without the stack

  • 0

In my application log (using log4j), I see a NullPointerException, but without the stack trace. I know that as an optimization, when an exception occurs many times – the jvm stops producing the stack trace. The problem is the exception occurred some time ago, and all my logs are filled with the exception without the stack trace. Is there a way to “reset” this mechanism, so the next thrown exception will be printed with the full stack trace? I don’t want to restart the application, as it is hard to reproduce this bug, and restarting may cause to “go away”…

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:36:38+00:00Added an answer on May 19, 2026 at 2:36 am

    Try running with the following JVM property:

    -XX:-OmitStackTraceInFastThrow
    

    From the Release Notes:

    The compiler in the server VM now
    provides correct stack backtraces for
    all “cold” built-in exceptions. For
    performance purposes, when such an
    exception is thrown a few times, the
    method may be recompiled. After
    recompilation, the compiler may choose
    a faster tactic using preallocated
    exceptions that do not provide a stack
    trace. To disable completely the use
    of preallocated exceptions, use this
    new flag:
    -XX:-OmitStackTraceInFastThrow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using tracelistener in a multithreaded application to log message remotely, but the
I have an mvc application that I allow businesses to log in using https://storea.mydomain.com
We are using ELMAH to log the web application exception which works great!. Also
I am using log4j for my application - there I need to see all
My application has a homebrew logging class that I'm migrating to using log4j under
I want to maintain two Log Files in my web-application using apache Log4j.jar: 1)
My java application uses log4j for logging. Using ant the project builds successfully, but
I have successfully configured an application that uses log4j for it's logging to log
I have a java application using log4j SyslogAppender (facility=USER) and I can see using
I'm using log4j to log in application. Now the log file is created in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.