[ECOMMERCE-480] Can not create Cart of Commercetools from CartEndpoint Created: 08/Oct/21  Updated: 18/Oct/22  Resolved: 10/Feb/22

Status: Closed
Project: E-commerce
Component/s: None
Affects Version/s: 1.3
Fix Version/s: 1.3.2, 1.2.7

Type: Bug Priority: Major
Reporter: Oanh Thai Hoang Assignee: Andrei Ichimescu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 2d 1h
Original Estimate: Not Specified

Attachments: File ECOMMERCE-480.postman_collection.json    
Issue Links:
dependency
depends upon ECOMMERCE-470 DEV DOC: Review and test endpoint doc... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: AuthorX Maintenance
Sprint: AuthorX 1, AuthorX 2
Story Points: 5

 Description   

Steps to reproduce

  1.  Call create cart endpoint from magnolia rest api. See postman example ECOMMERCE-480.postman_collection.json
  2.  See log error and rest return 500

.. Logs, screenshots, gifs...

Expected results

Cart should be created successfully

Actual results

See error log:

2021-10-08 09:37:36,173 ERROR info.magnolia.rest.RestExceptionMapper            : Exception thrown executing REST endpoint, returning 500
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.ZonedDateTime` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: io.sphere.sdk.carts.CartImpl["createdAt"])
{
    "error": {
        "code": "unknown",
        "message": "Java 8 date/time type `java.time.ZonedDateTime` not supported by default: add Module \"com.fasterxml.jackson.datatype:jackson-datatype-jsr310\" to enable handling (through reference chain: io.sphere.sdk.carts.CartImpl[\"createdAt\"])"
    }
}

Workaround

Development notes

  • Upgrade io.sphere.x.sdk

Generated at Mon Feb 12 01:44:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.