You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Spring Cloud Connector this has worked the way that one DataSource was returned by the CloudConfig. When we try to switch to java-cfenv this doesn't work any more as the datasource binding end up with two datasources, one based on the label and one based on the name. At the end we receive an exception as below:
2020-10-21T14:35:51.564+02:00 [APP/PROC/WEB/0] [OUT] Caused by: java.lang.IllegalArgumentException: No unique database service found. Found database service names [vmaasBrokerMySql, vmaasBrokerMySql]
2020-10-21T14:35:51.564+02:00 [APP/PROC/WEB/0] [OUT] at io.pivotal.cfenv.jdbc.CfJdbcUrlCreator.throwExceptionIfMultipleMatches(CfJdbcUrlCreator.java:97)
2020-10-21T14:35:51.564+02:00 [APP/PROC/WEB/0] [OUT] at io.pivotal.cfenv.jdbc.CfJdbcUrlCreator.findJdbcService(CfJdbcUrlCreator.java:87)
2020-10-21T14:35:51.564+02:00 [APP/PROC/WEB/0] [OUT] at io.pivotal.cfenv.jdbc.CfJdbcEnv.findJdbcService(CfJdbcEnv.java:46)
From my perspective either the first datasource created should be returned (then it would need a order which defines the preference) or the decision is not made based on name/labels, but the URI itself, as this would clearly distinguish between Oracle and MySQL.
The text was updated successfully, but these errors were encountered:
So far we are using the Spring Cloud Connector with a datasource in VCAP_SERVICES like this:
With Spring Cloud Connector this has worked the way that one DataSource was returned by the CloudConfig. When we try to switch to java-cfenv this doesn't work any more as the datasource binding end up with two datasources, one based on the label and one based on the name. At the end we receive an exception as below:
2020-10-21T14:35:51.564+02:00 [APP/PROC/WEB/0] [OUT] Caused by: java.lang.IllegalArgumentException: No unique database service found. Found database service names [vmaasBrokerMySql, vmaasBrokerMySql]
2020-10-21T14:35:51.564+02:00 [APP/PROC/WEB/0] [OUT] at io.pivotal.cfenv.jdbc.CfJdbcUrlCreator.throwExceptionIfMultipleMatches(CfJdbcUrlCreator.java:97)
2020-10-21T14:35:51.564+02:00 [APP/PROC/WEB/0] [OUT] at io.pivotal.cfenv.jdbc.CfJdbcUrlCreator.findJdbcService(CfJdbcUrlCreator.java:87)
2020-10-21T14:35:51.564+02:00 [APP/PROC/WEB/0] [OUT] at io.pivotal.cfenv.jdbc.CfJdbcEnv.findJdbcService(CfJdbcEnv.java:46)
From my perspective either the first datasource created should be returned (then it would need a order which defines the preference) or the decision is not made based on name/labels, but the URI itself, as this would clearly distinguish between Oracle and MySQL.
The text was updated successfully, but these errors were encountered: