2 years ago
I run my git repo for a web app on my local computer, it runs just fine in the web browser. I try to deploy the same Git Repo on railway, it crashes. This git repo is a full stack java app. It has a MySQL datababase on railway via a docker image. This MySql docker image that contains the MySQL database is active and running no problems. I have another service called "flight-search" that runs the web app in on railway to deploy it in the browser using this address "fun-flight-search.up.railway.app." After deploying the "flight-search" service, it crashes a few minutes later. The deploy logs show "Caused by: org.hibernate.HibernateException: Unable to determine Dialect without JDBC metadata (please set 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect')" "com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure" I am thinking it is not being able to communicate with the database. Somehow "flight-search", needs to communicate with the MySql docker image, and there seems to be a disconnect. I got all of my SQL variables set in the docker image on railway. I don't have any database variables in "flight-search". My question is how do you connect the MySql docker image with ''flight-search". So it avoids crashing. Any guidance is appreciated
1 Replies
2 years ago
Please reference the applicable documentation for the correct database URL format that JDBC expects.