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

Spring JIRA | Pavel Bernshtam | 3 years ago
  1. 0

    If I have a field of type Class in my serializable class, I can save it using couchbase repository, but I can't load it: Exception in thread "main" org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.String to type java.lang.Class 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.couchbase.core.convert.MappingCouchbaseConverter.readMap(MappingCouchbaseConverter.java:173) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:96) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.readValue(MappingCouchbaseConverter.java:480) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.access$200(MappingCouchbaseConverter.java:50) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:472) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.getValueInternal(MappingCouchbaseConverter.java:146) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$1.doWithPersistentProperty(MappingCouchbaseConverter.java:125) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$1.doWithPersistentProperty(MappingCouchbaseConverter.java:119) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:257) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:119) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:106) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:79) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:50) at org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:163) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findOne(SimpleCouchbaseRepository.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy6.findOne(Unknown Source) at com.salespredict.CouchBaseClient.main(CouchBaseClient.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

    Spring JIRA | 3 years ago | Pavel Bernshtam
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.String to type java.lang.Class
  2. 0

    If I have a field of type Class in my serializable class, I can save it using couchbase repository, but I can't load it: Exception in thread "main" org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.String to type java.lang.Class 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.couchbase.core.convert.MappingCouchbaseConverter.readMap(MappingCouchbaseConverter.java:173) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:96) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.readValue(MappingCouchbaseConverter.java:480) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.access$200(MappingCouchbaseConverter.java:50) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:472) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.getValueInternal(MappingCouchbaseConverter.java:146) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$1.doWithPersistentProperty(MappingCouchbaseConverter.java:125) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$1.doWithPersistentProperty(MappingCouchbaseConverter.java:119) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:257) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:119) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:106) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:79) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:50) at org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:163) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findOne(SimpleCouchbaseRepository.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy6.findOne(Unknown Source) at com.salespredict.CouchBaseClient.main(CouchBaseClient.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

    Spring JIRA | 3 years ago | Pavel Bernshtam
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.String to type java.lang.Class
  3. 0

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

    GitHub | 4 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 12 months 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 java.lang.String to type java.lang.Class

    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 Couchbase
    MappingCouchbaseConverter$1.doWithPersistentProperty
    1. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.readMap(MappingCouchbaseConverter.java:173)
    2. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:96)
    3. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.readValue(MappingCouchbaseConverter.java:480)
    4. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.access$200(MappingCouchbaseConverter.java:50)
    5. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:472)
    6. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.getValueInternal(MappingCouchbaseConverter.java:146)
    7. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$1.doWithPersistentProperty(MappingCouchbaseConverter.java:125)
    8. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$1.doWithPersistentProperty(MappingCouchbaseConverter.java:119)
    8 frames
  4. Spring Data Core
    BasicPersistentEntity.doWithProperties
    1. org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:257)
    1 frame
  5. Spring Data Couchbase
    SimpleCouchbaseRepository.findOne
    1. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:119)
    2. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:106)
    3. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:79)
    4. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:50)
    5. org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:163)
    6. org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findOne(SimpleCouchbaseRepository.java:88)
    6 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  7. Spring Data Core
    RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
    1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344)
    2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329)
    2 frames
  8. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    2 frames
  9. com.sun.proxy
    $Proxy6.findOne
    1. com.sun.proxy.$Proxy6.findOne(Unknown Source)
    1 frame
  10. com.salespredict
    CouchBaseClient.main
    1. com.salespredict.CouchBaseClient.main(CouchBaseClient.java:22)
    1 frame
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  12. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
    1 frame