CronJob task not loading configMap in OpenShift 3.11

Solution Verified - Updated -


CronJob task not loading configMap resource in OpenShift 3.11
It's expected to have configMap mounted at a specific folder in order to have access to data

Example error message returned from a Spring Boot app:

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: 
    Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]:
    Unsatisfied dependency expressed through method 'dataSource' parameter 0; nested exception is 
    Error creating bean with name 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties': 
    Could not bind properties to 'DataSourceProperties': prefix=spring.datasource, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is java.lang.IllegalStateException:
    fineorg.springframework.context.annotation.AnnotationConfigApplicationContext@4157f54e has been closed already


  • OpenShift Container Platform 3.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content