Play detection of RDBMS services is broken #30

scottfrederick opened this Issue Jul 16, 2013 · 9 comments


None yet
5 participants

scottfrederick commented Jul 16, 2013

When trying to auto-configure RDBMS database connections in Play apps, the auto-reconfig jar can't properly detect and set up the database connection.

The db.deafult.driver field in the config can't be properly set because of the way the label is being used to tell the difference between Postgres and MySQL:

It appears that the db.default.url field in the config isn't being set properly either, but not getting the driver set makes this hard to verify.

This can be tested using this sample app:

remove these three lines:

and comment in these three lines:

@ramnivas ramnivas added a commit that referenced this issue Jul 16, 2013

@ramnivas ramnivas Fix issue #30
Change-Id: Ie455c8e10051310718515e4422fa819579f2b05f

ramnivas commented Jul 20, 2013

Fixed and works with Will close when the corresponding PR (cloudfoundry/cloudfoundry-buildpack-java#9) is merged.


rmorgan commented Aug 15, 2013

@ramnivas Looks like this can be closed out?

ramnivas closed this Aug 15, 2013

Maybe this is a different issue, but I stumbled upon the following issue that sounds quite the same as mentioned above:

We have recently installed a private PCF installation. Using playframework, the db.default.url seems not to get auto-configured correctly.

db.default.url = ${?} does not get set. The other properties (e. g. connection.user seems to work just fine.

If I put the database URL manually into the configuration, everything just works as expected.


rmorgan commented Dec 10, 2013

@ramnivas Any ideas on this one?


ramnivas commented Dec 10, 2013

@thisismana a couple of questions:

  1. Does the same app work fine on
  2. What does the VCAP_SERVICES payload for service look like in your private PCF installation?

scottfrederick commented Dec 10, 2013

Auto-configuration of services in a Spring or Play app will not work with Pivotal CF services. The auto-reconfiguration support lib currently uses the older cloudfoundry-runtime library to detect services, and this library detects service by label ( The labels known to cloudfoundry-runtime lib work for but not for PCF.

cloudfoundry-runtime is being deprecated in favor of Spring Cloud for this and other reasons.

The auto-reconfiguration support lib has been updated to use Spring Cloud instead of cf-runtime-lib (57b7049), but this change needs to be merged into master and released. @rmorgan or @ramnivas might be able to comment on the timeline for this.

In the meantime, apps running on PCF should use manual configuration of services instead of auto-config.


scottfrederick commented Dec 10, 2013

Moved this to issue #37.

Thanks for this information. Is there an example on how to use Spring-Cloud
in combination with Playframework already? The official documentation is
not up to date and therefor leading directly to this issue:


andypiper commented Dec 11, 2013

Yes that Play doc definitely needs updating - I'll look into what is required to get them to change their site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment