ctamisier / generator-jhipster-quasar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad Request: JSON parse error: Cannot deserialize value of type `java.time.Instant`

oopsaleem opened this issue · comments

JDL

application {
  config {
    applicationType monolith
    authenticationType jwt
    baseName demo
    blueprints [generator-jhipster-quasar]
    buildTool maven
    cacheProvider ehcache
    clientFramework quasar
    databaseType sql
    devDatabaseType h2Disk
    enableTranslation true
    jhiPrefix jhi
    jhipsterVersion "7.3.1"
    languages [en, nl]
    nativeLanguage en
    otherModules [generator-jhipster-quasar]
    packageName com.demo.myApp
    prodDatabaseType postgresql
  }

  entities Timesheet
}

entity Timesheet {
  start Instant required
  finish Instant required
  location Site
  note TextBlob
}

dto Timesheet with mapstruct
paginate Timesheet with pagination
service Timesheet with serviceClass

The application is running fine. But when we create a new record we got the below error:

2022-01-02 15:38:06.139  WARN 985 --- [  XNIO-1 task-2] o.z.problem.spring.common.AdviceTraits   : Bad Request: JSON parse error: Cannot deserialize value of type `java.time.Instant` from String "2022-01-02T00:00:00+01:00": Failed to deserialize java.time.Instant: (java.time.format.DateTimeParseException) Text '2022-01-02T00:00:00+01:00' could not be parsed at index 19; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.time.Instant` from String "2022-01-02T00:00:00+01:00": Failed to deserialize java.time.Instant: (java.time.format.DateTimeParseException) Text '2022-01-02T00:00:00+01:00' could not be parsed at index 19
 at [Source: (PushbackInputStream); line: 1, column: 20] (through reference chain: com.demo.workforce.service.dto.TimesheetDTO["start"])

Thanks for reporting this !
It is now fixed