I have a Spring application that uses an Oracle DB. I created a user-provided service and bound it to my application. The Auto Reconfiguration starts but does not find a matching service. The Auto Reconfiguration does work in this environment if I use a MySQL DB. Based on the log output, it appears the Oracle data source creator is called, but it does not reconfigure the Oracle data source I have defined.
When I enter the Oracle DB information directly into the Spring configuration file that defines the Data Source, the application does connect to the DB. Which leads me to believe,the Data Source is being configured. Here’s the snippet from the Spring conf file –
<bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="close">
<property name="URL" value="jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=tcp)(HOST=10.52.23.39)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=HELIUM)(FAILOVER_MODE=(TYPE=select)(METHOD=basic))))" />
<property name="user" value="xxxxxx" />
<property name="password" value="xxxxx" />
</bean>
The class oracle.jdbc.pool.OracleDataSource does implement the javax.sql.DataSource interface, so I would expect it to be recognized by the Auto Reconfiguration framework. But for some reason, the framework is not recognizing this as a DataSource that needs to be reconfigured. Although when I created a MySQL data source it did recognize it and it was reconfigured. Here’s the snippet when I defined the MySQL DB.
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://us-cdbr-iron-east-01.cleardb.net:3306/ad_fb072289a01776b" />
<property name="username" value="XXXXX" />
<property name="password" value="XXXX" />
</bean>
--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/5bf560ba-bb35-46fb-902f-832c10482495%40cloudfoundry.org.
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.
{"user-provided":[{"name":"oracle-sv2","label":"user-provided","tags":[],"credentials":{"URL":"jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=tcp)(HOST=10.52.23.39)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=HELIUM)(FAILOVER_MODE=(TYPE=select)(METHOD=basic))))","password":"XXXX","user":"xxxxxxx"},"syslog_drain_url":""}]}
1.) The Oracle support looks for a "uri" or "url" property. Case does matter, so you're going to want to change your example to user lower case.
2.) The value for the "uri" or "url" should have the format "oracle://myuser:myp...@10.20.30.40:1234/database". This looks a little odd, but will get parsed and actually result in creating a JDBC URL of "jdbc:oracle:thin:myuser/myp...@10.20.30.40:1234/database".
3.) I don't see any support for the type of URl that you've specified, "jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=tcp)(HOST=10.52.23.39)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=HELIUM)(FAILOVER_MODE=(TYPE=select)(METHOD=basic))))". Trying to wedge that into the existing "uri" or "url" fields ends up with parsing errors--
You received this message because you are subscribed to a topic in the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CA%2BYXpzkb8P8fSsFftAtt%3DEFUG%2BV-6EGBunQtFBQO6d7brQAyng%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/8047abb6-c784-491d-9ae4-b72fb9519608%40cloudfoundry.org.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CAAqVxAzaPkoD0NzJ46CG63s6MhuTT99m5C7Yq4jqHzQLaJAfYQ%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CAEBZkOYcqRtOuzTc86m%2Be9j2E05PrXzKoyJM%3DM1uYPY5Zn46cg%40mail.gmail.com.
--To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+unsubscribe@cloudfoundry.org.
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CAAqVxAzaPkoD0NzJ46CG63s6MhuTT99m5C7Yq4jqHzQLaJAfYQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+unsubscribe@cloudfoundry.org.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/c426616b-1702-4141-882a-daed0f8e86cf%40cloudfoundry.org.