Menu

#93 Nullpointer Exception in Log4jMLogger.isLoggable

open
nobody
None
5
2011-02-09
2011-02-09
Suresh
No

Hi-

I am using the below technologies for a simple web application:

Hibernate 3.2
C3P0 for DB connection pooling (c3p0-0.9.1.2.jar)
Tomcat 6.0
Sybase
Struts2
JQuery
JDK1.5

hibernate.cfg.xml:
-------------------
<property name="hibernate.c3p0.max_size">50</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.timeout">3000</property>
<property name="hibernate.c3p0.max_statements">100</property>
<property name="hibernate.c3p0.idle_test_period">300</property>
<property name="hibernate.c3p0.acquire_increment">1</property>

c3p0-config.xml:
----------------
<default-config>
<property name="acquireRetryAttempts">15</property>
<property name="acquireRetryDelay">600000</property>
<property name="preferredTestQuery">SELECT 1</property>
<property name="breakAfterAcquireFailure">true</property>
<property name="testConnectionOnCheckout">true</property>
<property name="checkoutTimeout">30000</property>
<property name="idleConnectionTestPeriod">30</property>
<property name="initialPoolSize">10</property>
<property name="maxIdleTime">30</property>
<property name="maxPoolSize">100</property>
<property name="minPoolSize">10</property>
<property name="maxStatements">200</property>
<property name="numHelperThreads">10</property>
</default-config>

I am getting null pointer exception once in every 5 minutes like below on tomcat server logs.

Exception in thread "Timer-0" java.lang.NullPointerException
at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:257)
at com.mchange.v2.resourcepool.BasicResourcePool$CheckIdleResourcesTask.run(BasicResourcePool.java:1961)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

Ever since I deployed this application in STAGE environment, now I am frequently getting "Perm Gen" error. I am not sure whether the above "NullPointerException" on Log4jMLogger.isLoggable is causing the Out of Memory error.

Long time back, I see somebody has also reported on the similar issue with ID:1795823, but not sure the solution.

I have been struggling to find an answer for this issue, any help would be greatly appreciated.

Thanks,

Discussion


Log in to post a comment.

MongoDB Logo MongoDB