org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.Integer to type org.joda.time.DateTime

Spring JIRA | David van Geest | 2 years ago
  1. 0

    To reproduce: 1. Create an object with a DateTime field set to Jan. 1, 1970 (new DateTime(0)). 2. Save the object to Couchbase using a repository. 3. Read the object out of Couchbase again. Expected: object.getDateTime() should equal new DateTime(0) Actual: A conversion exception (see bottom). Solution: DateConverters.java defines various LongToDateTimeConverters, but does not define IntegerToDateTimeConverters. These additional Integer converters need to be defined. Exception: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.Integer to type org.joda.time.DateTime at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:276) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:171) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:153) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.getPotentiallyConvertedSimpleRead(MappingCouchbaseConverter.java:294) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.readValue(MappingCouchbaseConverter.java:687) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.access$200(MappingCouchbaseConverter.java:51) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:739) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:694) at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:78) at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:160) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:142) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:97) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:51) at org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:185) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findOne(SimpleCouchbaseRepository.java:101)

    Spring JIRA | 2 years ago | David van Geest
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.Integer to type org.joda.time.DateTime
  2. 0

    To reproduce: 1. Create an object with a DateTime field set to Jan. 1, 1970 (new DateTime(0)). 2. Save the object to Couchbase using a repository. 3. Read the object out of Couchbase again. Expected: object.getDateTime() should equal new DateTime(0) Actual: A conversion exception (see bottom). Solution: DateConverters.java defines various LongToDateTimeConverters, but does not define IntegerToDateTimeConverters. These additional Integer converters need to be defined. Exception: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.Integer to type org.joda.time.DateTime at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:276) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:171) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:153) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.getPotentiallyConvertedSimpleRead(MappingCouchbaseConverter.java:294) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.readValue(MappingCouchbaseConverter.java:687) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.access$200(MappingCouchbaseConverter.java:51) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:739) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:694) at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:78) at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:160) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:142) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:97) at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:51) at org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:185) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findOne(SimpleCouchbaseRepository.java:101)

    Spring JIRA | 2 years ago | David van Geest
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.Integer to type org.joda.time.DateTime
  3. 0

    Fix DATACOUCH-111 by DWvanGeest · Pull Request #33 · spring-projects/spring-data-couchbase · GitHub

    github.com | 1 year ago
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.Integer to type org.joda.time.DateTime
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    below is the stack trace: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.nio.HeapByteBuffer to type byte[] at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:276) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:171) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:153) at org.springframework.data.mapping.model.BeanWrapper.getPotentiallyConvertedValue(BeanWrapper.java:155) at org.springframework.data.mapping.model.BeanWrapper.setProperty(BeanWrapper.java:75) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertyFromRow(MappingCassandraConverter.java:187) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:150) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:145) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:294) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertiesFromRow(MappingCassandraConverter.java:145) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readEntityFromRow(MappingCassandraConverter.java:137) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readRow(MappingCassandraConverter.java:114) at org.springframework.data.cassandra.convert.MappingCassandraConverter.read(MappingCassandraConverter.java:202) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.getCollectionOfEntity(AbstractCassandraQuery.java:164) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.execute(AbstractCassandraQuery.java:139) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:384) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:344) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy94.findBySiteId(Unknown Source) at com.peerius.abandonedx.offline.camel.processor.TrackInfoCollectorProcessor.process(TrackInfoCollectorProcessor.java:37) at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291) at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200) at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

    Spring JIRA | 2 years ago | kodjo baah
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.nio.HeapByteBuffer to type byte[]
  6. 0

    below is the stack trace: {code} org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.nio.HeapByteBuffer to type byte[] at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:276) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:171) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:153) at org.springframework.data.mapping.model.BeanWrapper.getPotentiallyConvertedValue(BeanWrapper.java:155) at org.springframework.data.mapping.model.BeanWrapper.setProperty(BeanWrapper.java:75) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertyFromRow(MappingCassandraConverter.java:187) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:150) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:145) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:294) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertiesFromRow(MappingCassandraConverter.java:145) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readEntityFromRow(MappingCassandraConverter.java:137) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readRow(MappingCassandraConverter.java:114) at org.springframework.data.cassandra.convert.MappingCassandraConverter.read(MappingCassandraConverter.java:202) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.getCollectionOfEntity(AbstractCassandraQuery.java:164) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.execute(AbstractCassandraQuery.java:139) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:384) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:344) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy94.findBySiteId(Unknown Source) at com.peerius.abandonedx.offline.camel.processor.TrackInfoCollectorProcessor.process(TrackInfoCollectorProcessor.java:37) at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291) at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200) at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {code}

    Spring JIRA | 2 years ago | kodjo baah
    org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.nio.HeapByteBuffer to type byte[]

  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.Integer to type org.joda.time.DateTime

    at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound()
  2. Spring Core
    GenericConversionService.convert
    1. org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:276)
    2. org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:171)
    3. org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:153)
    3 frames
  3. Spring Data Couchbase
    MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue
    1. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.getPotentiallyConvertedSimpleRead(MappingCouchbaseConverter.java:294)
    2. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.readValue(MappingCouchbaseConverter.java:687)
    3. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.access$200(MappingCouchbaseConverter.java:51)
    4. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:739)
    5. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter$CouchbasePropertyValueProvider.getPropertyValue(MappingCouchbaseConverter.java:694)
    5 frames
  4. Spring Data Core
    ReflectionEntityInstantiator.createInstance
    1. org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:78)
    2. org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63)
    3. org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71)
    3 frames
  5. Spring Data Couchbase
    SimpleCouchbaseRepository.findOne
    1. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:160)
    2. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:142)
    3. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:97)
    4. org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:51)
    5. org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:185)
    6. org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findOne(SimpleCouchbaseRepository.java:101)
    6 frames