我正在从spring应用程序访问mysql 8.0以加载一些数据。问题是,当我单击触发数据库调用的链接时,是第一次抛出该错误。。但是,后续调用在没有问题的情况下正常工作。 / p>
server.xml(tomcat 7)中的数据源配置。 哪个特定配置导致了此问题,我该如何解决? 休眠5.3.1。最终版 MySQL8Dialect 2019-05-13 06:07:08,998 WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper:SQL Error: 0, SQLState: 08S01
2019-05-13 06:07:08,998 ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper:The last packet successfully
received from the server was 263,521,858 milliseconds ago. The last packet sent successfully to the server
was 263,521,858 milliseconds ago. is longer than the server configured value of 'wait_timeout'.
You should consider either expiring and/or testing connection validity before use in your application,
increasing the server configured values for client timeouts, or using the Connector/J connection property
'autoReconnect=true' to avoid this problem.
2019-05-13 06:07:08,998 WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper:SQL Error: 0, SQLState: null
2019-05-13 06:07:08,999 ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper:Already closed.
May 13, 2019 6:07:09 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet ReportingSearch Servlet threw exception
javax.portlet.faces.BridgeException: javax.faces.FacesException: org.hibernate.exception.GenericJDBCException:
Unable to release JDBC Connection; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException:
Unable to release JDBC Connection
<Resource name="jdbc/myAppcontentpool"
global="jdbc/myAppcontentpool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://some_url"
username="username"
password="password"
maxActive="500"
maxIdle="20"
minIdle="120"
maxWait="20000"
removeAbandoned="true"
removeAbandonedTimeout="20"
logAbandoned="true"
maxPoolSize="100"
minPoolSize="10"
acquireIncrement="10"
/>