Getting Hana SAP DBTech JDBC: Object is closed error on app startup

Viewed 902

like mentioned in the question I keep getting this exception when I run spring boot app connected to hana db container. This is the exception I get:

Caused by: org.flywaydb.core.internal.exception.FlywaySqlException:
Unable to read database connection metadata: SAP DBTech JDBC: Object is closed: com.sap.db.jdbc.HanaConnectionClean@19ccca5[closed]
-----------------------------------------------------------------------------------------------------------------------------------
SQL State   : HY000
Error Code  : -11212
Message     : SAP DBTech JDBC: Object is closed: com.sap.db.jdbc.HanaConnectionClean@19ccca5[closed]

I am able to connect to it via CLI and db clients but app is failing.

1 Answers

I faced this issue when the password was expired. You can update the password by using

ALTER USER <SCHEMA_NAME> PASSWORD "<NEW_PASSWORD>";

Or if you don't want the password to expire, you can always do:

ALTER USER <SCHEMA_NAME> DISABLE PASSWORD LIFETIME;
Related