报错问题如下:
05/05/2016 10:10:37.101 [http-bio-8080-exec-4] WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper:144 - SQL Error: 0, SQLState: null
05/05/2016 10:10:37.103 [http-bio-8080-exec-4] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper:146 - Cannot create PoolableConnectionFactory (Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
05/05/2016 10:10:37.101 [http-bio-8080-exec-4] WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper:144 - SQL Error: 0, SQLState: null
05/05/2016 10:10:37.103 [http-bio-8080-exec-4] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper:146 - Cannot create PoolableConnectionFactory (Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
检查配置吧,比如是不是配置文件里用了127.0.0.1或者localhost这一类的地址。
另外还是建议写个jdbc,上面提供的错误信息太少,无法判断错误原因。jdbc程序又用不了几分钟,有你等回帖的时间,jdbc都写好测出错误原因了。
应该是java配置问题