org.springframework.web.util.NestedServletException

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.

  • Hello, now that hibernate5 is out, I migrated all my JPA entities to use {{OffsetDateTime}} and of course the {{lastModifiedDate}} is now also {{OffsetDateTime}}. However, my tests started failing now with this exception: {code} org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.time.OffsetDateTime to type java.util.Calendar at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:313) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:195) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176) at org.springframework.data.auditing.DefaultAuditableBeanWrapperFactory$DateConvertingAuditableBeanWrapper.getAsCalendar(DefaultAuditableBeanWrapperFactory.java:208) at org.springframework.data.auditing.MappingAuditableBeanWrapperFactory$MappingMetadataAuditableBeanWrapper.getLastModifiedDate(MappingAuditableBeanWrapperFactory.java:210) at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.prepareHeaders(AbstractRepositoryRestController.java:180) at org.springframework.data.rest.webmvc.RepositoryEntityController.getItemResource(RepositoryEntityController.java:324) {code} And I saw that in {{AbstractRepositoryRestController:180}} there's a cast to {{java.util.Calendar}} {code} Calendar lastModifiedDate = wrapper.getLastModifiedDate(); {code} And I also noticed the class {{DateTimeConverters}} in {{spring-context}} which is missing an {{OffsetDateTimeToCalendarConverter}} - maybe one should be added?!
    via by Petar Tahchiev,
  • Hello, now that hibernate5 is out, I migrated all my JPA entities to use {{OffsetDateTime}} and of course the {{lastModifiedDate}} is now also {{OffsetDateTime}}. However, my tests started failing now with this exception: {code} org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.time.OffsetDateTime to type java.util.Calendar at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:313) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:195) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176) at org.springframework.data.auditing.DefaultAuditableBeanWrapperFactory$DateConvertingAuditableBeanWrapper.getAsCalendar(DefaultAuditableBeanWrapperFactory.java:208) at org.springframework.data.auditing.MappingAuditableBeanWrapperFactory$MappingMetadataAuditableBeanWrapper.getLastModifiedDate(MappingAuditableBeanWrapperFactory.java:210) at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.prepareHeaders(AbstractRepositoryRestController.java:180) at org.springframework.data.rest.webmvc.RepositoryEntityController.getItemResource(RepositoryEntityController.java:324) {code} And I saw that in {{AbstractRepositoryRestController:180}} there's a cast to {{java.util.Calendar}} {code} Calendar lastModifiedDate = wrapper.getLastModifiedDate(); {code} And I also noticed the class {{DateTimeConverters}} in {{spring-context}} which is missing an {{OffsetDateTimeToCalendarConverter}} - maybe one should be added?!
    via by Petar Tahchiev,
    • org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.time.OffsetDateTime to type java.util.Calendar at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:313) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:195) at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176) at org.springframework.data.auditing.DefaultAuditableBeanWrapperFactory$DateConvertingAuditableBeanWrapper.getAsCalendar(DefaultAuditableBeanWrapperFactory.java:208) at org.springframework.data.auditing.MappingAuditableBeanWrapperFactory$MappingMetadataAuditableBeanWrapper.getLastModifiedDate(MappingAuditableBeanWrapperFactory.java:210) at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.prepareHeaders(AbstractRepositoryRestController.java:180) at org.springframework.data.rest.webmvc.RepositoryEntityController.getItemResource(RepositoryEntityController.java:324)
    No Bugmate found.