org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type mongo.CarId to type java.lang.String

Spring JIRA | Patrik Fredriksson | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    After upgrading to 1.0.2 storing fails with the stacktrace below: It seems like the incorrect property is used when mapping the ID, possibly being confused by a getter 'getId()' that is not referencing the MongoDB Id. See example project on Bitbucket for testcase. {{CarRepositoryTest#findByCarId}} https://bitbucket.org/patrikfr/springmongotest {noformat} org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type mongo.CarId to type java.lang.String at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:475) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:175) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:154) at org.springframework.data.mapping.model.BeanWrapper.getPotentiallyConvertedValue(BeanWrapper.java:233) at org.springframework.data.mapping.model.BeanWrapper.getProperty(BeanWrapper.java:212) at org.springframework.data.mapping.model.BeanWrapper.getProperty(BeanWrapper.java:183) at org.springframework.data.mongodb.core.MongoTemplate.populateIdIfNecessary(MongoTemplate.java:1375) at org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:723) at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:708) at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.save(SimpleMongoRepository.java:70) {noformat}

    Spring JIRA | 5 years ago | Patrik Fredriksson
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type mongo.CarId to type java.lang.String
  2. 0

    After upgrading to 1.0.2 storing fails with the stacktrace below: It seems like the incorrect property is used when mapping the ID, possibly being confused by a getter 'getId()' that is not referencing the MongoDB Id. See example project on Bitbucket for testcase. {{CarRepositoryTest#findByCarId}} https://bitbucket.org/patrikfr/springmongotest {noformat} org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type mongo.CarId to type java.lang.String at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:475) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:175) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:154) at org.springframework.data.mapping.model.BeanWrapper.getPotentiallyConvertedValue(BeanWrapper.java:233) at org.springframework.data.mapping.model.BeanWrapper.getProperty(BeanWrapper.java:212) at org.springframework.data.mapping.model.BeanWrapper.getProperty(BeanWrapper.java:183) at org.springframework.data.mongodb.core.MongoTemplate.populateIdIfNecessary(MongoTemplate.java:1375) at org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:723) at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:708) at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.save(SimpleMongoRepository.java:70) {noformat}

    Spring JIRA | 5 years ago | Patrik Fredriksson
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type mongo.CarId to type java.lang.String
  3. 0

    Neo4jTemplate.save(): ConverterNotFoundException when using manually created and attached 1:1 entity

    GitHub | 5 years ago | SchulteMarkus
    javax.faces.FacesException: #{companyBean.submit}: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type domain.entities.Root to type org.springframework.data.neo4j.support.Neo4jTemplate
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Set MongoDb converter programatically

    Stack Overflow | 4 years ago | Daniel
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type org.joda.time.LocalDate to type java.lang.String
  6. 0

    MongoDB map reduce, gives error " No converter found capable of converting from type java.lang.Boolean to type int"

    Stack Overflow | 3 years ago | jeff porter
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.Boolean to type int

  1. shiva768 1 times, last 1 year ago
9 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.core.convert.ConverterNotFoundException

    No converter found capable of converting from type mongo.CarId to type java.lang.String

    at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound()
  2. Spring Core
    GenericConversionService.convert
    1. org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:475)
    2. org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:175)
    3. org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:154)
    3 frames
  3. Spring Data Core
    BeanWrapper.getProperty
    1. org.springframework.data.mapping.model.BeanWrapper.getPotentiallyConvertedValue(BeanWrapper.java:233)
    2. org.springframework.data.mapping.model.BeanWrapper.getProperty(BeanWrapper.java:212)
    3. org.springframework.data.mapping.model.BeanWrapper.getProperty(BeanWrapper.java:183)
    3 frames
  4. Spring Data MongoDB - Core
    SimpleMongoRepository.save
    1. org.springframework.data.mongodb.core.MongoTemplate.populateIdIfNecessary(MongoTemplate.java:1375)
    2. org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:723)
    3. org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:708)
    4. org.springframework.data.mongodb.repository.support.SimpleMongoRepository.save(SimpleMongoRepository.java:70)
    4 frames