Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Play detection of RDBMS services is broken #30

scottfrederick opened this Issue · 9 comments

5 participants


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 referenced this issue from a commit
@ramnivas ramnivas Fix issue #30
Change-Id: Ie455c8e10051310718515e4422fa819579f2b05f

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


@ramnivas Looks like this can be closed out?

@ramnivas ramnivas closed this

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.


@ramnivas Any ideas on this one?


@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?


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.


Moved this to issue #37.


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
Something went wrong with that request. Please try again.