{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1932","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1932/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1932/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1932/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/1932","id":103191047,"number":1932,"title":"Joda DateTime serialization","user":{"login":"maheshkaranjkar","id":10084323,"avatar_url":"https://avatars.githubusercontent.com/u/10084323?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshkaranjkar","html_url":"https://github.com/maheshkaranjkar","followers_url":"https://api.github.com/users/maheshkaranjkar/followers","following_url":"https://api.github.com/users/maheshkaranjkar/following{/other_user}","gists_url":"https://api.github.com/users/maheshkaranjkar/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshkaranjkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshkaranjkar/subscriptions","organizations_url":"https://api.github.com/users/maheshkaranjkar/orgs","repos_url":"https://api.github.com/users/maheshkaranjkar/repos","events_url":"https://api.github.com/users/maheshkaranjkar/events{/privacy}","received_events_url":"https://api.github.com/users/maheshkaranjkar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-26T06:50:49Z","updated_at":"2015-08-26T06:55:03Z","closed_at":"2015-08-26T06:55:03Z","body":"Hi Guys,\r\n\r\nWe are getting could not deserialize error when we try to map resultset of storeprocedure.\r\n Attching code.\r\n\r\nResult setmapping class.\r\n\r\n<code>\r\n@NamedNativeQueries({\r\n    @NamedNativeQuery(\r\n            name = \"callCurriculumSearchProc\",\r\n            query = \"EXEC curriculumSearchProcedure :academy_id,:curriculum_id,:curriulum_abbr,:demand_forecasting,\"\r\n\t    \t\t+ \":event_custodian_id,:pre_post_flag,:reviewed_date,:is_active,:id\",\r\n\t    \t\tresultSetMapping = \"curriculumSearchResult\"\r\n    )\r\n })\r\n@SqlResultSetMapping(name = \"curriculumSearchResult\",\r\nclasses = {\r\n        @ConstructorResult(targetClass = CurriculumSearchResult.class,\r\n                columns = {\r\n                        @ColumnResult(name = \"id\" ,type = Long.class),\r\n                        @ColumnResult(name = \"curriculum_name\"),\r\n                        @ColumnResult(name = \"cirriculum_abbr\"),\r\n                        @ColumnResult(name = \"academy_name\"),\r\n                        @ColumnResult(name = \"academy_short_Name\"),\r\n                        @ColumnResult(name = \"reviewed_date\", type = DateTime.class),\r\n                        @ColumnResult(name = \"custodian\")})\r\n})\r\n\r\n@MappedSuperclass\r\npublic class CurriculumSearchResult implements Serializable{\r\n\t\r\n\tprivate static final long serialVersionUID = 1L;\r\n\t\r\n\t@Column(name = \"ID\")\r\n    private Long id;\r\n\t\r\n\t@Column(name = \"curriculum_name\")\r\n    private String curriculum_name;\r\n\t\r\n\t@Column(name = \"curriculum_abbr\")\r\n    private String curriculum_abbr;\r\n    \r\n\t@Column(name = \"academy_name\")\r\n    private String academy_name;\r\n    \r\n\t@Column(name = \"academy_short_Name\")\r\n    private String academy_short_name;\r\n    \r\n\t@Type(type = \"org.jadira.usertype.dateandtime.joda.PersistentDateTime\")\r\n    @JsonSerialize(using = CustomDateTimeSerializer.class)\r\n    @JsonDeserialize(using = CustomDateTimeDeserializer.class)\r\n    @Column(name = \"reviewed_date\")\r\n    private DateTime reviewed_date;\r\n    \r\n    @Column(name = \"custodian\")\r\n    private String eventCustodian;\r\n    \r\n\tpublic CurriculumSearchResult (){\r\n\t\t\r\n\t}\r\n\r\npublic CurriculumSearchResult(Long id, String curriculum_name,\r\n\t\tString curriculum_abbr, String academy_name, String academy_short_name,\r\n\t\tDateTime reviewed_date, String eventCustodian) {\r\n\tsuper();\r\n\tthis.id = id;\r\n\tthis.curriculum_name = curriculum_name;\r\n\tthis.curriculum_abbr = curriculum_abbr;\r\n\tthis.academy_name = academy_name;\r\n\tthis.academy_short_name = academy_short_name;\r\n\tthis.reviewed_date = reviewed_date;\r\n\tthis.eventCustodian = eventCustodian;\r\n}\r\n    \r\n    \r\n\tpublic Long getId() {\r\n\t\treturn id;\r\n\t}\r\n\r\n\tpublic void setId(Long id) {\r\n\t\tthis.id = id;\r\n\t}\r\n\r\n\tpublic String getCurriculum_name() {\r\n\t\treturn curriculum_name;\r\n\t}\r\n\r\n\tpublic void setCurriculum_name(String curriculum_name) {\r\n\t\tthis.curriculum_name = curriculum_name;\r\n\t}\r\n\r\n\tpublic String getCurriculum_abbr() {\r\n\t\treturn curriculum_abbr;\r\n\t}\r\n\r\n\tpublic void setCurriculum_abbr(String curriculum_abbr) {\r\n\t\tthis.curriculum_abbr = curriculum_abbr;\r\n\t}\r\n\r\n\tpublic String getAcademy_name() {\r\n\t\treturn academy_name;\r\n\t}\r\n\r\n\tpublic void setAcademy_name(String academy_name) {\r\n\t\tthis.academy_name = academy_name;\r\n\t}\r\n\r\n\tpublic String getAcademy_short_name() {\r\n\t\treturn academy_short_name;\r\n\t}\r\n\r\n\tpublic void setAcademy_short_name(String academy_short_name) {\r\n\t\tthis.academy_short_name = academy_short_name;\r\n\t}\r\n\r\n\tpublic DateTime getReviewed_date() {\r\n\t\treturn reviewed_date;\r\n\t}\r\n\r\n\tpublic void setReviewed_date(DateTime reviewed_date) {\r\n\t\tthis.reviewed_date = reviewed_date;\r\n\t}\r\n\r\n\tpublic String getEventCustodian() {\r\n\t\treturn eventCustodian;\r\n\t}\r\n\r\n\tpublic void setEventCustodian(String eventCustodian) {\r\n\t\tthis.eventCustodian = eventCustodian;\r\n\t}\r\n\r\n\t@Override\r\n\t    public int hashCode() {\r\n\t        return Objects.hashCode(id);\r\n\t    }\r\n\r\n\t@Override\r\n\tpublic String toString() {\r\n\t\treturn \"CurriculumSearchResult [id=\" + id + \", curriculum_name=\"\r\n\t\t\t\t+ curriculum_name + \", curriculum_abbr=\" + curriculum_abbr\r\n\t\t\t\t+ \", academy_name=\" + academy_name + \", academy_short_name=\"\r\n\t\t\t\t+ academy_short_name + \", reviewed_date=\" + reviewed_date\r\n\t\t\t\t+ \", eventCustodian=\" + eventCustodian + \"]\";\r\n\t}\r\n\t\r\n}\r\n</code>\r\n\r\nGetting this error when there is value in \"reviewed_date\" column . But works well when value is null \r\n\r\nBut same for Jhipster generated class is working fine..\r\n\r\nPlease guide me in resolving this issue.\r\n\r\nRegards\r\nMahesh"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/134867179","html_url":"https://github.com/jhipster/generator-jhipster/issues/1932#issuecomment-134867179","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1932","id":134867179,"user":{"login":"jdubois","id":316835,"avatar_url":"https://avatars.githubusercontent.com/u/316835?v=3","gravatar_id":"","url":"https://api.github.com/users/jdubois","html_url":"https://github.com/jdubois","followers_url":"https://api.github.com/users/jdubois/followers","following_url":"https://api.github.com/users/jdubois/following{/other_user}","gists_url":"https://api.github.com/users/jdubois/gists{/gist_id}","starred_url":"https://api.github.com/users/jdubois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdubois/subscriptions","organizations_url":"https://api.github.com/users/jdubois/orgs","repos_url":"https://api.github.com/users/jdubois/repos","events_url":"https://api.github.com/users/jdubois/events{/privacy}","received_events_url":"https://api.github.com/users/jdubois/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T06:55:03Z","updated_at":"2015-08-26T06:55:03Z","body":"I'm sorry but I don't see why this would be a JHipster issue? We did not generate your stored procedure.\r\n\r\nPlease ask this on SO."}}