倒霉的Openshift重启后出现Exception# Java - 爪哇娇娃
b*i
1 楼
就是那个JBoss Spring Framework终于可以使用Mysql了。但是,每次我手动重启后,
打开页面就出现Exception。为什么刚开机就不能open database?是不是那个database
。我经常需要等待一小时以上才能看到正常的网页。此app使用了Hibernate。我就是想
看到一个网站能够把用户保存的数据存到数据库,下次app重启后仍然可以看到保存过
的数据。我手动重启是为了模拟网站计算机崩溃,然后看看数据库是不是还在。为什么
这么个简单的事情就这么多问题?
org.springframework.web.util.NestedServletException: Request processing
failed; nested exception is javax.persistence.PersistenceException: org.
hibernate.exception.JDBCConnectionException: could not prepare statement
javax.persistence.PersistenceException: org.hibernate.exception.
JDBCConnectionException: could not prepare statement
org.hibernate.exception.JDBCConnectionException: could not prepare statement
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No
operations allowed after connection closed.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link
failure
The last packet successfully received from the server was 84,221
milliseconds ago. The last packet sent successfully to the server was 105
milliseconds ago.
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:2540)
打开页面就出现Exception。为什么刚开机就不能open database?是不是那个database
。我经常需要等待一小时以上才能看到正常的网页。此app使用了Hibernate。我就是想
看到一个网站能够把用户保存的数据存到数据库,下次app重启后仍然可以看到保存过
的数据。我手动重启是为了模拟网站计算机崩溃,然后看看数据库是不是还在。为什么
这么个简单的事情就这么多问题?
org.springframework.web.util.NestedServletException: Request processing
failed; nested exception is javax.persistence.PersistenceException: org.
hibernate.exception.JDBCConnectionException: could not prepare statement
javax.persistence.PersistenceException: org.hibernate.exception.
JDBCConnectionException: could not prepare statement
org.hibernate.exception.JDBCConnectionException: could not prepare statement
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No
operations allowed after connection closed.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link
failure
The last packet successfully received from the server was 84,221
milliseconds ago. The last packet sent successfully to the server was 105
milliseconds ago.
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:2540)