Boa tarde a todos.
Eu estou com um problema aqui, e gostaria da ajuda do pessoal do GUJ para me dar uma força.
O problema é o seguinte, eu to com uma aplicação web rodando, ela usa Hibernate + VRaptor + Mysql, ja esta tudo “pronto”, a não ser uma coisa, quando eu inicio o TomCat ela roda normalmente, exibi as tabelas e tudo, mais depois de uns 40 segundos ela cai, e me lança a seguinte exeption:
[code]org.hibernate.exception.JDBCConnectionException: could not execute query
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:97)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66
<-------------------------------------------------------------------------------------------------------------->
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 91.038 milliseconds ago. The last packet sent successfully to the server was 8 milliseconds ago.
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
<---------------------------------------------------------------------------------------------------------->
java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2497)
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2949)[/code]
Pelo oque eu pude entender a conexão com o Mysql foi perdia, mais porque?
o meu hibernate.properties esta assim:
hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://***.***.***.***/***
hibernate.connection.username = usuario
hibernate.connection.password = ******
connection.provider_class = org.hibernate.connection.C3P0ConnectionProvider
HIBERNATE.SHOW_SQL = TRUE
HIBERNATE.FORMAT_SQL = TRUE
hibernate.c3p0.min_size = 50
hibernate.c3p0.max_size = 30
hibernate.c3p0.timeout = 28800
hibernate.c3p0.max_statements = 50
hibernate.c3p0.idle_test_period = 5000
hibernate.c3p0.acquire_increment = 5
Alguma ideia?Talvez o meu c3po estja errado?
Desde de ja agradeço.
Arthur dos Santos