Bonjour voilà le contenu de la console sous eclipse quand j'éxécute le client...

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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
6 août 2008 13:02:48 org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.4.sp1
6 août 2008 13:02:48 org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
6 août 2008 13:02:48 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
6 août 2008 13:02:48 org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
6 août 2008 13:02:48 org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
6 août 2008 13:02:48 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
6 août 2008 13:02:48 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : com/dao/FBEleve/Eleve.hbm.xml
6 août 2008 13:02:48 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.dao.FBEleve.Eleve -> fb_eleves
6 août 2008 13:02:48 org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
6 août 2008 13:02:48 org.hibernate.connection.C3P0ConnectionProvider configure
INFO: C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://172.16.0.43:3306/test"
6 août 2008 13:02:48 org.hibernate.connection.C3P0ConnectionProvider configure
INFO: Connection properties: {user=root, password=****}
6 août 2008 13:02:48 org.hibernate.connection.C3P0ConnectionProvider configure
INFO: autocommit mode: false
6 août 2008 13:02:49 com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
6 août 2008 13:02:49 com.mchange.v2.c3p0.C3P0Registry banner
INFO: Initializing c3p0-0.9.0 [built 11-July-2005 00:43:29 -0400; debug? true; trace: 10]
6 août 2008 13:02:49 com.mchange.v2.c3p0.PoolBackedDataSource getPoolManager
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@47393f [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@64f6cd [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 64f6cd, idleConnectionTestPeriod -> 3000, initialPoolSize -> 5, maxIdleTime -> 300, maxPoolSize -> 20, maxStatements -> 50, maxStatementsPerConnection -> 0, minPoolSize -> 5, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@a61164 [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> a61164, jdbcUrl -> jdbc:mysql://172.16.0.43:3306/test", properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 300, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ], factoryClassLocation -> null, identityToken -> 47393f, numHelperThreads -> 3 ]
6 août 2008 13:03:18 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
ATTENTION: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@5f8172 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30).
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
ATTENTION: Could not obtain connection metadata
java.sql.SQLException: Connections could not be acquired from the underlying database!
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:236)
	at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)
	at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:56)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
	at persistence.HibernateUtil.<clinit>(HibernateUtil.java:15)
	at com.dao.FBEleve.Client.main(Client.java:31)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
	at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:970)
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:232)
	... 7 more
6 août 2008 13:03:18 org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
6 août 2008 13:03:18 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
ATTENTION: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1a5f739 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30).
6 août 2008 13:03:18 org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Using default transaction strategy (direct JDBC transactions)
6 août 2008 13:03:18 org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: auto
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: enabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL inserts for batching: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
6 août 2008 13:03:18 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JPA-QL strict compliance: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.NoCacheProvider
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
6 août 2008 13:03:18 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Named query checking : enabled
6 août 2008 13:03:18 org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
6 août 2008 13:03:18 org.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
6 août 2008 13:03:48 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
ATTENTION: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@c5495e -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30).
6 août 2008 13:03:48 org.hibernate.util.JDBCExceptionReporter logExceptions
ATTENTION: SQL Error: 0, SQLState: null
6 août 2008 13:03:48 org.hibernate.util.JDBCExceptionReporter logExceptions
GRAVE: Connections could not be acquired from the underlying database!
Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection
	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
	at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
	at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
	at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
	at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
	at com.dao.FBEleve.Client.main(Client.java:33)
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:236)
	at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)
	at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:56)
	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
	... 5 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
	at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:970)
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:232)
	... 8 more
Ceci est le code source du client
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
package com.dao.FBEleve;
 
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import persistence.HibernateUtil;
 
public class Client {
 
	/**
	 * @param args
	 */
	@SuppressWarnings("deprecation")
	public static void main(String[] args) {
		MySQLDAOFatory factory = new MySQLDAOFatory();
		EleveDAO dao = factory.getEleveDAO();
		dao.execute();
		Eleve elv = new Eleve(12, "HAMMAMI Sofien");
		System.out.println(elv.toString());
		Session session = null;
		SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
		session = sessionFactory.openSession();
		Transaction tx = session.beginTransaction();
		session.save(elv);
		tx.commit();		
		System.out.println(sessionFactory == null);
		System.out.println("session is open " + session.isOpen());
		session.close();
	}
}
une idée svp? merci