Reputation: 15
I'm facing a deployment issue with a Spring Boot application that's throwing a BeanCreationException during startup. The application works perfectly in the local development environment but fails when deployed with the following error related to the JdbcSessionDataSourceScriptDatabaseInitializer:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcSessionDataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/session/JdbcSessionConfiguration.class]: Failed to instantiate [org.springframework.boot.autoconfigure.session.JdbcSessionDataSourceScriptDatabaseInitializer]: Factory method 'jdbcSessionDataSourceScriptDatabaseInitializer' threw exception; nested exception is java.lang.IllegalStateException: Failed to determine DatabaseDriver
In my project, I got a file called application.properties, and everything is setup correctly, the credentials for my database are good, on my local testing, everything seems fine, I can modify in the database(delete , add, seek a item). The problem arises when I try to deploy the app(using docker containers) to Google Cloud. Now, the problem that I think it is, is that when deployed the app can't communicate with the sql database, I think this may be the problem cause I got an issue early in development when testing locally did not have access to the sql database until I put my IP address on the firewall(or something like that, now I enabled the private IP assignment). In this link https://pastebin.com/4hGewVv7 is the logs i got from Google Cloud. Any tips are welcomed, I tried everything (didn't use Kubernetes on this project).
Upvotes: 0
Views: 37