Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

JobRunr with Spring Boot – ConverterNotFound Exception

I have a Kotlin Spring Boot application and tried to integrate the JobRunr Spring Boot Starter dependency, along with the Kotlin JobRunr Support Module. Dependencies:

// Jackson JSON Serialization
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.3")

// Spring Boot Version is 2.7.1 (latest)

// Jobs
implementation("org.jobrunr:jobrunr-spring-boot-starter:5.1.6")
implementation("org.jobrunr:jobrunr-kotlin-1.7-support:5.1.6")

I configured JobRunr like this:

@Configuration
class JobRunrConfiguration {

    @Bean
    fun jobMapper(): JobMapper {
        return JobMapper(JacksonJsonMapper(jacksonObjectMapper()))
    }
}

I’m using Postgres as my database.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Application properties are as follows:

# JobRunr
org.jobrunr.background_job_server=true
org.jobrunr.dashboard=true

It is quite basic stuff after following the documentation, but when I try to start the application I get the error:

Failed to bind properties under ‘org.jobrunr.background-job-server’ to
org.jobrunr.spring.autoconfigure.JobRunrProperties$BackgroundJobServer".
Reason: org.springframework.core.convert.ConverterNotFoundException:
No converter found capable of converting from type [java.lang.String]
to type
[org.jobrunr.spring.autoconfigure.JobRunrProperties$BackgroundJobServer]

I tried different object mappers and configurations, swapping out dependencies, but nothing is working. Anyone have some pointers or ideas in the right direction?

>Solution :

It fails to parse the configuration below:

# JobRunr
org.jobrunr.background_job_server=true
org.jobrunr.dashboard=true

according to the source code the configuration should look like:

org.jobrunr.background-job-server.enabled=true
org.jobrunr.dashboard.enabled=true
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading