org.springframework.core.convert.ConversionFailedException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Normal {{String}} field tried to be converted to {{BigInteger}}. {code} org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type java.math.BigInteger for value 'KKaK'; nested exception is java.lang.NumberFormatException: For input string: "KKaK" at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:170) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:154) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getPotentiallyConvertedSimpleWrite(MappingMongoConverter.java:604) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeSimpleInternal(MappingMongoConverter.java:585) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:73) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$4.doWithPersistentProperty(MappingMongoConverter.java:370) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$4.doWithPersistentProperty(MappingMongoConverter.java:357) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:173) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:357) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:329) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.write(MappingMongoConverter.java:294) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.write(MappingMongoConverter.java:73) at org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:615) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:577) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:568) {code}
    via by drypot,
  • Normal {{String}} field tried to be converted to {{BigInteger}}. {code} org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type java.math.BigInteger for value 'KKaK'; nested exception is java.lang.NumberFormatException: For input string: "KKaK" at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:170) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:154) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getPotentiallyConvertedSimpleWrite(MappingMongoConverter.java:604) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeSimpleInternal(MappingMongoConverter.java:585) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:73) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$4.doWithPersistentProperty(MappingMongoConverter.java:370) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$4.doWithPersistentProperty(MappingMongoConverter.java:357) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:173) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:357) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:329) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.write(MappingMongoConverter.java:294) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.write(MappingMongoConverter.java:73) at org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:615) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:577) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:568) {code}
    via by drypot,
  • springframework mongoDb ConversionFailedException
    via by Unknown author,
  • Spring IO-2.1 is based on the Spring Boot 1.4, which, in turn has been upgraded to SF-4.3. The {{MethodRabbitListenerEndpointTests.invalidMessagePayloadType()}} fails with different results for expectation: {noformat} Expected: (an instance of org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException and exception with cause is an instance of org.springframework.messaging.handler.annotation.support.MethodArgumentTypeMismatchException) but: exception with cause is an instance of org.springframework.messaging.handler.annotation.support.MethodArgumentTypeMismatchException cause <org.springframework.amqp.support.converter.MessageConversionException: Cannot handle message> is a org.springframework.amqp.support.converter.MessageConversionException Stacktrace was: org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener method could not be invoked with the incoming message Endpoint handler details: Method [public void org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpointTests$RabbitEndpointSampleBean.invalidMessagePayloadType(org.springframework.messaging.Message<java.lang.Integer>)] Bean [org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpointTests$RabbitEndpointSampleBean@2b6856dd] at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:115) at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:92) at org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpointTests.invalidMessagePayloadType(MethodRabbitListenerEndpointTests.java:393) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: org.springframework.amqp.support.converter.MessageConversionException: Cannot handle message ... 33 more Caused by: org.springframework.messaging.converter.MessageConversionException: Failed to convert message payload 'test' to 'java.lang.Integer'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.lang.Integer] for value 'test'; nested exception is java.lang.NumberFormatException: For input string: "test" at org.springframework.messaging.converter.GenericMessageConverter.fromMessage(GenericMessageConverter.java:71) at org.springframework.messaging.handler.annotation.support.MessageMethodArgumentResolver.convertPayload(MessageMethodArgumentResolver.java:126) at org.springframework.messaging.handler.annotation.support.MessageMethodArgumentResolver.resolveArgument(MessageMethodArgumentResolver.java:90) at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:112) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:138) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:107) at org.springframework.amqp.rabbit.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:48) at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:112) ... 32 more Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.lang.Integer] for value 'test'; nested exception is java.lang.NumberFormatException: For input string: "test" at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176) at org.springframework.messaging.converter.GenericMessageConverter.fromMessage(GenericMessageConverter.java:67) ... 39 more Caused by: java.lang.NumberFormatException: For input string: "test" {noformat} When we would like to see: {noformat} org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener method could not be invoked with the incoming message Endpoint handler details: Method [public void org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpointTests$RabbitEndpointSampleBean.invalidMessagePayloadType(org.springframework.messaging.Message<java.lang.Integer>)] Bean [org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpointTests$RabbitEndpointSampleBean@258e2e41] at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:120) at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:92) at org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpointTests.invalidMessagePayloadType(MethodRabbitListenerEndpointTests.java:392) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: org.springframework.messaging.handler.annotation.support.MethodArgumentTypeMismatchException: Could not resolve method parameter at index 0 in method: public void org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpointTests$RabbitEndpointSampleBean.invalidMessagePayloadType(org.springframework.messaging.Message<java.lang.Integer>) The expected Message<?> payload type [java.lang.Integer] does not match the actual payload type [java.lang.String] at org.springframework.messaging.handler.annotation.support.MessageMethodArgumentResolver.resolveArgument(MessageMethodArgumentResolver.java:56) at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:77) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:139) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:108) at org.springframework.amqp.rabbit.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:48) at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:112) {noformat} Looks like {{MessageMethodArgumentResolver}} has been changed recently: SPR-13288.
    via by Artem Bilan,
  • If you define a repository this way: {code:java} @RepositoryRestResource(collectionResourceRel = "people", path = "people") public interface PersonRepository extends PagingAndSortingRepository<Person, Long> { Page<Person> findByAddress(@Param("address") Address address, Pageable p); } {code} where {{Address}} in another Entity, you can invoke the search method like this: http://localhost:8080/people/search/findByAddress?address=/addresses/1 and everything works like a charm. Now suppose you want to use QueryDSL predicates on the repository, so the repository must implement {{QueryDslPredicateExecutor}} interface: {code:java} @RepositoryRestResource(collectionResourceRel = "people", path = "people") public interface PersonRepository extends PagingAndSortingRepository<Person, Long>, QueryDslPredicateExecutor<Person> { Page<Person> findByAddress(@Param("address") Address address, Pageable p); } {code} By implementing this interface something changes in the REST behaviour of the repository and if you try to invoke the same search method: http://localhost:8080/people/search/findByAddress?address=/addresses/1 you get this exception: {noformat} org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type java.lang.Long for value '/addresses/1'; nested exception is java.lang.NumberFormatException: For input string: "/addresses/1" at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.data.repository.support.DomainClassConverter$ToEntityConverter.convert(DomainClassConverter.java:159) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.data.querydsl.binding.QuerydslPredicateBuilder.convertToPropertyPathSpecificType(QuerydslPredicateBuilder.java:217) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.querydsl.binding.QuerydslPredicateBuilder.getPredicate(QuerydslPredicateBuilder.java:109) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.config.QuerydslAwareRootResourceInformationHandlerMethodArgumentResolver.postProcess(QuerydslAwareRootResourceInformationHandlerMethodArgumentResolver.java:88) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.config.RootResourceInformationHandlerMethodArgumentResolver.resolveArgument(RootResourceInformationHandlerMethodArgumentResolver.java:92) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.config.RootResourceInformationHandlerMethodArgumentResolver.resolveArgument(RootResourceInformationHandlerMethodArgumentResolver.java:40) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:78) ~[spring-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] [...] Caused by: java.lang.NumberFormatException: For input string: "/addresses/1" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_66] at java.lang.Long.parseLong(Long.java:578) ~[na:1.8.0_66] at java.lang.Long.valueOf(Long.java:803) ~[na:1.8.0_66] at org.springframework.util.NumberUtils.parseNumber(NumberUtils.java:197) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.StringToNumberConverterFactory$StringToNumber.convert(StringToNumberConverterFactory.java:61) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.StringToNumberConverterFactory$StringToNumber.convert(StringToNumberConverterFactory.java:48) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService$ConverterFactoryAdapter.convert(GenericConversionService.java:425) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] ... 60 common frames omitted {noformat} Trying to use the "previous" format (by passing the id of the related entity) http://localhost:8080/people/search/findByAddress?address=1 doesn't work either (this used to work with 2.2.3.RELEASE): {noformat} java.lang.IllegalArgumentException: Cannot resolve URI 1. Is it local or remote? Only local URIs are resolvable. at org.springframework.data.rest.core.UriToEntityConverter.convert(UriToEntityConverter.java:114) ~[spring-data-rest-core-2.4.1.RELEASE.jar:na] at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.data.repository.support.ReflectionRepositoryInvoker.convert(ReflectionRepositoryInvoker.java:248) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.repository.support.ReflectionRepositoryInvoker.prepareParameters(ReflectionRepositoryInvoker.java:238) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.repository.support.ReflectionRepositoryInvoker.invokeQueryMethod(ReflectionRepositoryInvoker.java:203) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.rest.core.support.UnwrappingRepositoryInvokerFactory$UnwrappingRepositoryInvoker.invokeQueryMethod(UnwrappingRepositoryInvokerFactory.java:153) ~[spring-data-rest-core-2.4.1.RELEASE.jar:na] at org.springframework.data.querydsl.QuerydslRepositoryInvokerAdapter.invokeQueryMethod(QuerydslRepositoryInvokerAdapter.java:149) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositorySearchController.executeQueryMethod(RepositorySearchController.java:313) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositorySearchController.executeSearch(RepositorySearchController.java:177) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] {noformat}
    via by Massimo Mangoni,
  • Spring Converters fail for SecureList
    via jpasecurity by nurquiza
    ,
  • Spring Data Neo4j 4.2.0 and pagination
    via Stack Overflow by alexanoid
    ,
  • If you define a repository this way: {code:java} @RepositoryRestResource(collectionResourceRel = "people", path = "people") public interface PersonRepository extends PagingAndSortingRepository<Person, Long> { Page<Person> findByAddress(@Param("address") Address address, Pageable p); } {code} where {{Address}} in another Entity, you can invoke the search method like this: http://localhost:8080/people/search/findByAddress?address=/addresses/1 and everything works like a charm. Now suppose you want to use QueryDSL predicates on the repository, so the repository must implement {{QueryDslPredicateExecutor}} interface: {code:java} @RepositoryRestResource(collectionResourceRel = "people", path = "people") public interface PersonRepository extends PagingAndSortingRepository<Person, Long>, QueryDslPredicateExecutor<Person> { Page<Person> findByAddress(@Param("address") Address address, Pageable p); } {code} By implementing this interface something changes in the REST behaviour of the repository and if you try to invoke the same search method: http://localhost:8080/people/search/findByAddress?address=/addresses/1 you get this exception: {noformat} org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type java.lang.Long for value '/addresses/1'; nested exception is java.lang.NumberFormatException: For input string: "/addresses/1" at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.data.repository.support.DomainClassConverter$ToEntityConverter.convert(DomainClassConverter.java:159) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.data.querydsl.binding.QuerydslPredicateBuilder.convertToPropertyPathSpecificType(QuerydslPredicateBuilder.java:217) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.querydsl.binding.QuerydslPredicateBuilder.getPredicate(QuerydslPredicateBuilder.java:109) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.config.QuerydslAwareRootResourceInformationHandlerMethodArgumentResolver.postProcess(QuerydslAwareRootResourceInformationHandlerMethodArgumentResolver.java:88) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.config.RootResourceInformationHandlerMethodArgumentResolver.resolveArgument(RootResourceInformationHandlerMethodArgumentResolver.java:92) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.config.RootResourceInformationHandlerMethodArgumentResolver.resolveArgument(RootResourceInformationHandlerMethodArgumentResolver.java:40) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:78) ~[spring-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] [...] Caused by: java.lang.NumberFormatException: For input string: "/addresses/1" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_66] at java.lang.Long.parseLong(Long.java:578) ~[na:1.8.0_66] at java.lang.Long.valueOf(Long.java:803) ~[na:1.8.0_66] at org.springframework.util.NumberUtils.parseNumber(NumberUtils.java:197) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.StringToNumberConverterFactory$StringToNumber.convert(StringToNumberConverterFactory.java:61) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.StringToNumberConverterFactory$StringToNumber.convert(StringToNumberConverterFactory.java:48) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService$ConverterFactoryAdapter.convert(GenericConversionService.java:425) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] ... 60 common frames omitted {noformat} Trying to use the "previous" format (by passing the id of the related entity) http://localhost:8080/people/search/findByAddress?address=1 doesn't work either (this used to work with 2.2.3.RELEASE): {noformat} java.lang.IllegalArgumentException: Cannot resolve URI 1. Is it local or remote? Only local URIs are resolvable. at org.springframework.data.rest.core.UriToEntityConverter.convert(UriToEntityConverter.java:114) ~[spring-data-rest-core-2.4.1.RELEASE.jar:na] at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) ~[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.data.repository.support.ReflectionRepositoryInvoker.convert(ReflectionRepositoryInvoker.java:248) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.repository.support.ReflectionRepositoryInvoker.prepareParameters(ReflectionRepositoryInvoker.java:238) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.repository.support.ReflectionRepositoryInvoker.invokeQueryMethod(ReflectionRepositoryInvoker.java:203) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.rest.core.support.UnwrappingRepositoryInvokerFactory$UnwrappingRepositoryInvoker.invokeQueryMethod(UnwrappingRepositoryInvokerFactory.java:153) ~[spring-data-rest-core-2.4.1.RELEASE.jar:na] at org.springframework.data.querydsl.QuerydslRepositoryInvokerAdapter.invokeQueryMethod(QuerydslRepositoryInvokerAdapter.java:149) ~[spring-data-commons-1.11.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositorySearchController.executeQueryMethod(RepositorySearchController.java:313) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositorySearchController.executeSearch(RepositorySearchController.java:177) ~[spring-data-rest-webmvc-2.4.1.RELEASE.jar:na] {noformat}
    via by Massimo Mangoni,
    • org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type java.math.BigInteger for value 'KKaK'; nested exception is java.lang.NumberFormatException: For input string: "KKaK" at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:170) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:154) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getPotentiallyConvertedSimpleWrite(MappingMongoConverter.java:604) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeSimpleInternal(MappingMongoConverter.java:585) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:73) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$4.doWithPersistentProperty(MappingMongoConverter.java:370) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$4.doWithPersistentProperty(MappingMongoConverter.java:357) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:173) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:357) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:329) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.write(MappingMongoConverter.java:294) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.write(MappingMongoConverter.java:73) at org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:615) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:577) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:568)

    Users with the same issue

    SteVio1989
    1 times, last one,
    Malcshour
    1 times, last one,