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

  • SEARCH
  • Home
  • 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'm using log4j to log in application. Now the log file is created in
My java application uses log4j for logging. Using ant the project builds successfully, but
I am using Log4j in my application, and the libraries that I use that
I have successfully configured an application that uses log4j for it's logging to log
I'm working with an application that logs to Windows Application Log regularly (viewable through
My application uses the Trace object to log information. The information is captured in
I'm writing an application that needs a log-like view, (similar to how an IM
I have an application that has created a number of custom event log sources
So we have our J2EE application using Log4j like this public class CustomerController {
I'm trying start java application but in browser i see standard tomcat's page. Server

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.