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 6941629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:54:37+00:00 2026-05-27T12:54:37+00:00

while using Perf4j together with Log4j I get the following exception: log4j:ERROR Error occured

  • 0

while using Perf4j together with Log4j I get the following exception:

log4j:ERROR Error occured while converting date.
java.lang.NullPointerException
at java.lang.System.arraycopy(Native Method)
at java.lang.AbstractStringBuilder.getChars(AbstractStringBuilder.java:328)
at java.lang.StringBuffer.getChars(StringBuffer.java:201)
at org.apache.log4j.helpers.ISO8601DateFormat.format(ISO8601DateFormat.java:130)
at java.text.DateFormat.format(DateFormat.java:316)
at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:444)
at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:65)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:502)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:302)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.perf4j.log4j.AsyncCoalescingStatisticsAppender$1.handle(AsyncCoalescingStatisticsAppender.java:200)
at org.perf4j.helpers.GenericAsyncCoalescingStatisticsAppender$Dispatcher.run(GenericAsyncCoalescingStatisticsAppender.java:316)
at java.lang.Thread.run(Thread.java:662)

My log4j.xml looks like this:

<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
    <param name="Target" value="System.out" />
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d %-5p: %c - %m%n" />
    </layout>
</appender>

<!-- Perf4j Appender -->
<appender name="CoalescingStatistics"
          class="org.perf4j.log4j.AsyncCoalescingStatisticsAppender">
    <param name="TimeSlice" value="10000"/>
    <appender-ref ref="fileAppender"/>
</appender>

<!-- This file appender is used to output aggregated performance statistics -->
<appender name="fileAppender" class="org.apache.log4j.FileAppender">
    <param name="File" value="perfStats.log"/>
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%m%n"/>
    </layout>
</appender>

<!-- Perf4j Loggers -->
<logger name="org.perf4j.TimingLogger" additivity="false">
    <level value="INFO"/>
    <appender-ref ref="CoalescingStatistics"/>
</logger>

What am I doing wrong?

  • 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-27T12:54:38+00:00Added an answer on May 27, 2026 at 12:54 pm

    I hope I can help someone who just ran into the same exception. So here is my answer:

    It seems that the described exception only appears under a few circumstances.
    Here is my setup:

    • Developing a web application
    • Tomcat 6.0.32
    • Log4j 1.2.15
    • Perf4j 0.9.16

    Furthermore it seems that the exception only occurs after one redeploys the web application. The exception does NOT occur if you just fresh start the tomcat.

    What I have done to get rid of the exception:

    • Changed log4j pattern from value="%d %-5p: %c - %m%n" to value="%d{yyyy-MM-dd HH:mm:ss} %-5p: %c - %m%n"
    • Upgraded Log4j to version 1.2.16
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

while using tiles along with spring i m getting following error: java.net.UnknownHostException: tiles.apache.org program
While using this line of code, I get the error CS1040: Preprocessor directives must
While using a third party dll I was getting the following exception: exePath must
While using princomp() function in R, the following error is encountered : covariance matrix
while using the following constructor $this->pdo = new PDO ($this->source, $this->username, $this->password); if I
while using document cookie <script typ=text/javascript> document.domain=example.com; </script> I got an error.i don't know
While using Java's switch case, it excepts only char and int, but I want
While using inner join on Pro*C I am getting the below error: PCC-S-02201, Encountered
While using SubSonic 3 I wrote the below. I thought I would get user_ref
While using django.core.paginator import ObjectPaginator, I'm getting this error: NeedIndexError: The built-in indices are

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.