I have a PostgreSQL RDS and I have a Java EE application.
When I use the RDS and run the app locally it works perfect!
However if I package this application, deploy on Elastic Beanstalk, the following error occurs.
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
When I checked the logs of the application in Elastic Bean, I found the line below
2015-05-11 06:08:25,283 WFMSS INFO org.hibernate.connection.C3P0ConnectionProvider - C3P0 using driver: org.postgresql.Driver at URL: jdbc:postgresql://127.0.0.1:5432/myDBName
Question:
- Why is it using 127.0.0.1 when I clearly specified in my
persistence.xmlthe correct connection URL?
Any advice will be greatly appreciated. Thanks.
Aucun commentaire:
Enregistrer un commentaire