0

I have a Play 2.5 (Java) project, my project depend on 3 JDBC datasources that defined in application.conf. Why Play Framework does not start when one of these JDBC datasources cannot create? My system can work without one of these JDBC datasources but i see this log and netty server does not start:

Configuration error: Configuration error[Cannot connect to database [datasource_name]]
Saeed Zarinfam
  • 9,818
  • 7
  • 59
  • 72
  • Is the database accessible from the place you wish to run the server and could you post your application.conf? Obviously hide sensitive information. – kevto Nov 07 '16 at 13:16
  • @kevto My configuration in application.conf is valid. the database server is not stable and down regularly. – Saeed Zarinfam Nov 07 '16 at 13:19
  • Make sure your database is up and running then and accessible from where you wish to run your server. – kevto Nov 07 '16 at 13:20
  • @kevto 10% of my application features depend on that database, i want play continue to work when cannot create connection pool nor stop. – Saeed Zarinfam Nov 07 '16 at 13:23
  • You can probably get around this by not using Plays JDBC classes and starting it up on your own. I tried injecting `DBApi` instead of `Database` but Play still does a health check on start. – Simon Nov 07 '16 at 14:16
  • @Simon I tested a Play, Scala and Slick project and there were not this problem in that project !!! – Saeed Zarinfam Nov 08 '16 at 08:24

0 Answers0