sayli talathi
sayli talathi

Reputation: 127

Springboot unable to determine JDBC url from datasource while deploying application in PCF(Pivotal Cloud Foundary)

I am deploying SpringBoot application in PCF which has oracle database connection i have also made user created service instance with oracle credentials and binded to application.

Following is the VCAP service variables :

{
"name": "healthwatch-api-database",
"instance_name": "healthwatch-api-database",
"binding_name": null,
"credentials": {
"driver": "oracle.jdbc.OracleDriver",
"url": "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=10.157.129.175)(PORT=1527))(CONNECT_DATA=(SERVER=DEDICATED)(SID=DEVCLOUD)))",
"username": "EXTRANET_USER",
"password": "EXTRANET_USER1"
},

Following are the logs after pushing application :

2018-10-09T18:26:41.29+0530 [APP/PROC/WEB/0] OUT o.s.b.w.s.ServletRegistrationBean - Mapping servlet: 'dispatcherServlet' to [/] 2018-10-09T18:26:41.47+0530 [APP/PROC/WEB/0] OUT 09 Oct 2018 12:56:41.471/UTC [main] INFO

2018-10-09T18:26:41.47+0530 [APP/PROC/WEB/0] OUT o.s.j.d.DriverManagerDataSource - Loaded JDBC driver: oracle.jdbc.OracleDriver

2018-10-09T18:26:42.17+0530 [APP/PROC/WEB/0] OUT 09 Oct 2018 12:56:42.174/UTC [main] WARN

2018-10-09T18:26:42.17+0530 [APP/PROC/WEB/0] OUT o.s.b.a.orm.jpa.DatabaseLookup - Unable to determine jdbc url from datasource

2018-10-09T18:26:42.17+0530 [APP/PROC/WEB/0] OUT org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1

2018-10-09T18:26:42.17+0530 [APP/PROC/WEB/0] OUT ORA-01882: timezone region not found

2018-10-09T18:26:42.17+0530 [APP/PROC/WEB/0] OUT at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:338)

Upvotes: 0

Views: 2807

Answers (1)

K.AJ
K.AJ

Reputation: 1292

Looking at the error log, the cause seems to be related to timezone settings.

2018-10-09T18:26:42.17+0530 [APP/PROC/WEB/0] OUT ORA-01882: timezone region not found

Here is a post talking about a similar issue - Getting ORA-01882: timezone region not found with Oracle UCP, on aws ec2 instance?

Now how do you pass the timezone to your app?

You do that through manifest file. Check out the article - https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html

Upvotes: 0

Related Questions