Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8819843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:27:51+00:00 2026-06-14T05:27:51+00:00

I have been using the March 2.2 Snapshot of Restlet GA for a while

  • 0

I have been using the March 2.2 Snapshot of Restlet GA for a while and using Jackson to handle JSON conversion. Everything has been working fine and essentially invisibly. In particular, I never even need to instantiate an objectMapper. I have also been using Joda DateTime and that has been fine as well.

This week, I was upgrading to the latest 2.2 Snapshot, which uses Jackson 2.0.4 (rather than 1.9). In that version of Jackson, support for Joda DateTime has been moved to a module (out of the core Jackson libraries).

Now, when I run my test code, I get an error along the lines of:

WARNING: Unable to convert a [application/json,UTF-8] representation into an object of class com.fourspires.api.dto.CommitmentDTO
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "year" (class org.joda.time.DateTime), not marked as ignorable (2 known properties: , "chronology", "millis"])
 at [Source: org.restlet.engine.io.UnclosableInputStream@dcc5312; line: 1, column: 701] (through reference chain: com.fourspires.api.dto.CommitmentDTO["completeBy"]->org.joda.time.DateTime["year"])

Which leads to a 415 error when I try to do a Post().

The answer from the Jackson folks is that I must register the JodaModule that handles the conversion as follows:

ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new JodaModule());  

This seems simple enough, but I have no idea where to put this code. My test code is calling:

commitmentsResource = 
  rootClient.getChild(SOME_PATH, CommitmentsResource.class);  
commitmentsClient = ((ClientProxy) commitmentsResource).getClientResource();
commitmentsClient.post()

On the server side, I have an interface:

public interface CommitmentsResource {
  @Get Representation represent();
  @Post("json") Representation postJson(CommitmentDTO commitment);  
  @Post("form") Representation postForm(Form commitmentForm);  
}

And then I have the CommitmentServerResource that has

@Override
public final Representation postJson(final CommitmentDTO commitmentDTO) {...}

@Override
public final Representation postForm(final Form form) {...}

So I can’t see where to insert the objectMapper so that the Post() can be called. It’s like I want to set the global/default object mapper, but I don’t know where to find it (or if it exists).

I tried adding the two objectMapper lines of code to my createInboundRoot, but that didn’t seem to make a difference.

Thanks so much for any advice as I seem to be totally stuck here….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:27:52+00:00Added an answer on June 14, 2026 at 5:27 am

    I’ve just tried with the last snapshot of Restlet 2.2 (released in october, based on jackson 2.1.0), it just works for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using CI just fine using the MySQL driver. I want to
I have been using jQuery for a while and this makes no sense to
I have been using it for a project I am working on, but some
We have been successfully using protobuf-net v1 in a compact framework application to handle
I have been using grep with perl extension for multiline match .However it turns
I have been using TortoiseSVN for some time and I really like it. I
I have been using Stanford POS Tagger to tag parts of speech in a
I have been using play 1.2.5rc4 for development of one app and I have
I have been using an API to do some work. This is how I
I have been using some Javascript to create a text field once an certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.