I am using java , GWT, and hibernate with mysql. To avoide too many connection exception I am configuring the c3p0 in my application, but after configuration when I deploy my application to tomcat and run application so after 5 to 10 request application gets crashed and in tomcat logs I am getting following exception repeatedly:
org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/war] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1d2aa39]) and a value of type [com.google.inject.servlet.ServletDefinition$2] (value [com.google.inject.servlet.ServletDefinition$2@ef3675]) but failed to remove it when the web application was stopped.Threads are going to be renewed over time to try and avoid a probable memory leak.
My c3p0 configuration is as follows:
<property name="connection.provider_class"> org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.connection.autoReconnect">true</property>
<property name="hibernate.c3p0.acquire_increment">3</property>
<property name="hibernate.c3p0.idle_test_period">5</property>
<property name="hibernate.c3p0.max_size">50</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.min_size">0</property>
<property name="hibernate.c3p0.timeout">5</property>
<property name="hibernate.c3p0.idleConnectionTestPeriod">5</property>
help me if anyone knows the solution... thanks in advance..