cloudfoundry / multiapps-controller

The server side component (controller) for Multi-Target Application (MTA) for Cloud Foundry
Apache License 2.0
54 stars 41 forks source link

deploy-service is not working with the Postgres DB user provided service "deploy-service-database" #1299

Open saratkumar123 opened 1 year ago

saratkumar123 commented 1 year ago

I tried deploying deploy-service application with a user-provided service. I was getting the below errors. I created the Postgres DB user provided service with the name deploy-service-database. This DB is hosted in our On-premise infrastructure.

Error message: 2023-04-03T06:51:14.16+0000 [APP/PROC/WEB/0] ERR SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 2023-04-03T06:51:14.16+0000 [APP/PROC/WEB/0] ERR SLF4J: Defaulting to no-operation (NOP) logger implementation 2023-04-03T06:51:14.16+0000 [APP/PROC/WEB/0] ERR SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 2023-04-03T06:51:14.49+0000 [APP/PROC/WEB/0] OUT [CONTAINER] lina.core.ContainerBase.[Catalina].[localhost].[/] SEVERE Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener] 2023-04-03T06:51:14.49+0000 [APP/PROC/WEB/0] OUT org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultEntityManagerFactory' defined in class path resource [org/cloudfoundry/multiapps/controller/web/configuration/DatabaseConfiguration.class]: Unsatisfied dependency expressed through method 'defaultEntityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/cloudfoundry/multiapps/controller/web/configuration/DatabaseConfiguration.class]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:postgresql://10.32.17.16:5432/test?user=admin&password=

IvanBorislavovDimitrov commented 1 year ago

Hello, in order to use a custom UPS as a service you have to explicitly add a postgresql driver in the code. It is currently not supported. You can check: https://github.com/cloudfoundry/multiapps-controller/pull/1300

bonzofenix commented 1 month ago

In the Autoscaler team we are hitting this same problem.