Bonjour,

Depuis que je construit mon pool de connexion via spring comme ci dessous

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
      	<property name="driverClass"><value>${jdbc.driverClass}</value></property>
      	<property name="jdbcUrl"><value>${jdbc.url}</value></property>
      	<property name="user"><value>${jdbc.username}</value></property>
      	<property name="password"><value>${jdbc.password}</value></property>
      	<property name="checkoutTimeout"><value>${c3p0.checkoutTimeout}</value></property>
        <property name="minPoolSize"><value>${c3p0.minPoolSize}</value></property>
        <property name="maxPoolSize"><value>${c3p0.maxPoolSize}</value></property>
        <property name="maxIdleTime"><value>${c3p0.maxIdleTime}</value></property>
        <property name="maxConnectionAge"><value>${c3p0.maxConnectionAge}</value></property>
        <property name="acquireIncrement"><value>${c3p0.acquireIncrement}</value></property>
        <property name="maxStatements"><value>${c3p0.maxStatements}</value></property>
        <property name="propertyCycle"><value>${c3p0.propertyCycle}</value></property>
        <property name="unreturnedConnectionTimeout"><value>${c3p0.unreturnedConnectionTimeout}</value></property>
        <property name="autoCommitOnClose"><value>${c3p0.autoCommitOnClose}</value></property>
        <property name="preferredTestQuery"><value>${c3p0.preferredTestQuery}</value></property>
   </bean>
 
   <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
      	<property name="dataSource"><ref local="dataSource"/></property>
      	<property name="hibernateProperties">
	     	<props>
	       		<prop key="hibernate.dialect">${hibernate.dialect}</prop>
	       		<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
	       		<prop key="hibernate.connection.release_mode">auto</prop>
	       		<prop key="hibernate.connection.autocommit">true</prop>
	       		<prop key="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</prop>
                <prop key="hibernate.c3p0.acquire_increment">${c3p0.acquireIncrement}</prop>
                <prop key="hibernate.c3p0.min_size">0</prop>
                <prop key="hibernate.c3p0.max_size">${c3p0.maxPoolSize}</prop>
                <prop key="hibernate.c3p0.timeout">${c3p0.maxIdleTime}</prop>
                <prop key="hibernate.c3p0.max_statement">${c3p0.maxStatements}</prop>
                <prop key="hibernate.c3p0.idle_test_period">30</prop>
	     	</props>
	   	</property>
	   	<property name="mappingDirectoryLocations">
			<list>
				<value>classpath:/com/leaderinfo/novanet/entity</value>
			</list>
		</property>
 
   </bean>
 
   <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
     	<property name="sessionFactory" ref="sessionFactory" />
   </bean>

J'obtiens des erreurs dans mes loggues de manière recurente

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2009-11-01 20:55:03,611 WARN  org.hibernate.util.JDBCExceptionReporter http-80-60 ==> SQL Error: 0, SQLState: 08003
2009-11-01 20:55:03,611 ERROR org.hibernate.util.JDBCExceptionReporter http-80-60 ==> No operations allowed after connection closed.
 
Connection was closed explicitly by the application at the following location:
 
** BEGIN NESTED EXCEPTION ** 
 
java.lang.Throwable
 
STACKTRACE:
 
java.lang.Throwable
	at com.mysql.jdbc.Connection.close(Connection.java:1125)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:549)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
	at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
 
 
** END NESTED EXCEPTION **
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2009-10-30 07:26:36,633 INFO  com.mchange.v2.resourcepool.BasicResourcePool Timer-0 ==> A checked-out resource is overdue, and will be destroyed: com.mchange.v2.c3p0.impl.NewPooledConnection@73cfd55d
2009-10-30 07:35:19,902 WARN  com.mchange.v2.c3p0.impl.NewPooledConnection http-80-19 ==> [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
2009-10-30 07:35:19,904 WARN  com.mchange.v2.c3p0.impl.NewPooledConnection http-80-19 ==> [c3p0] Another error has occurred [ java.sql.SQLException: No operations allowed after connection closed.
 
Connection was closed explicitly by the application at the following location:
 
** BEGIN NESTED EXCEPTION ** 
 
java.lang.Throwable
 
STACKTRACE:
 
java.lang.Throwable
	at com.mysql.jdbc.Connection.close(Connection.java:1125)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:549)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
	at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
 
 
** END NESTED EXCEPTION **
 
 ] which will not be reported to listeners!
java.sql.SQLException: No operations allowed after connection closed.
Avez vous une idée du problème ?

Merci à vous