kostaky, thanks for your reply.
I don't think it comes from c3po, because a simple piece of code without c3p0 doesn't run either.
Code:
Configuration cfg = new Configuration()
.addResource("Customer.hbm.xml")
.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLInnoDBDialect")
.setProperty("hibernate.connection.driver_class", "com.mysql.jdbc.Driver")
.setProperty("hibernate.connection.url", "jdbc:mysql://192.168.10.52:3308/people")
.setProperty("hibernate.connection.username", "login")
.setProperty("hibernate.connection.password", "password");
SessionFactory sessionFactory = cfg.buildSessionFactory();
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
Query q = session.createQuery("select count(*) from Customer");
long result = (Long) q.uniqueResult();
tx.rollback();
The same problem happens, the server port is purely ignored ...
Thrown exception:
Code:
2010-10-07 14:22:53,471 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 08S01
2010-10-07 14:22:53,471 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Exception in thread "main" org.hibernate.exception.JDBCConnectionException: Cannot open connection
If I set autoconnect=true, the previous deadlock appears. But the server is running and listenig on 3308, I can access it from other softwares.