I get the following error message when trying to connect a web app running on EAP6 to MySQL in OpenShift.
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Communications link failure
How do I fix this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The same issue was discussed at https://community.jboss.org/thread/202318.
The solution is to append “?autoReconnect=true” to the connection URL. You do this in the standalone.xml file, found in the .openshift/config folder in your OpenShift Maven project.
EDIT
This is actually a known bug: https://community.jboss.org/thread/177144. Validating the connection can be used as a workaround.