Skip to content

Problem with Joda DateTime - Play 2.2 #439

@mycentrio

Description

@mycentrio

I'm trying to use swagger for my scala Play 2.2 project. It seems there's a problem with Joda DateTime. Using the sample play project, in 'Order' case class, I changed the shipDate from java Date to Joda DateTime and it throws an error when I call /store/order API:

[JsonMappingException: Class org.joda.time.tz.CachedDateTimeZone has no default constructor; can not instantiate default bean value to support 'properties=JsonSerialize.Inclusion.NON_DEFAULT' annotation (through reference chain: scala.collection.convert.SeqWrapper[0]->models.Order["shipDate"]->org.joda.time.DateTime["zone"])]

Please help.

P.S. I removed "com.wordnik" %% "swagger-play2-utils" % "1.3.2" from dependencies because the latest version in swagger repository was 1.3.1 and the project could not compile with 1.3.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions