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 7082375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:02:43+00:00 2026-05-28T07:02:43+00:00

I have the following code with a simple class and a method for writing

  • 0

I have the following code with a simple class and a method for writing and then reading:

ObjectMapper mapper = new ObjectMapper();
  try{
      DataStore testOut = new DataStore();
      DataStore.Checklist ch1 = testOut.addChecklist();
      ch1.SetTitle("Checklist1");

      String output = mapper.writeValueAsString(testOut);
      JsonNode rootNode = mapper.readValue(output, JsonNode.class);
      Map<String,Object> userData = mapper.readValue(output, Map.class);
    }


public class DataStore {
public static class Checklist
{
    public Checklist()
    {

    }
    private String _title;
    public String GetTitle()
    {
        return _title;
    }
    public void SetTitle(String title)
    {
        _title = title;
    }

}
//Checklists
private Vector<Checklist> _checklists = new Vector<Checklist>();
public Checklist addChecklist()
{
    Checklist ch = new Checklist();
    ch.SetTitle("New Checklist");
    _checklists.add(ch);
    return ch;
}
public Vector<Checklist> getChecklists()
{
    return _checklists;
}
public void setChecklists(Vector<Checklist> checklists)
{
    _checklists = checklists;
}
}

The line:
String output = mapper.writeValueAsString(testOut);
causes an exception that has had me baffled for hours and about to abandon using this at all.
Any hints are appreciated.

Here is the exception:
No serializer found for class DataStore$Checklist and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: DataStore[“checklists”]->java.util.Vector[0])

  • 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-05-28T07:02:44+00:00Added an answer on May 28, 2026 at 7:02 am

    There are multiple ways to do it, but I will start with what you are doing wrong: your naming of getter and setter method is wrong — in Java one uses “camel-case”, so you should be using “getTitle”. Because of this, properties are not found.

    Besides renaming methods to use Java-style names, there are alternatives:

    • You can use annotation JsonProperty("title") for GetTitle(), so that property is recognized
    • If you don’t want the wrapper object, you could alternatively just add @JsonValue for GetTitle(), in which case value used for the whole object would be return value of that method.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following simple Java code: package testj; import java.util.*; public class Query<T>
I have a simple application with the following code: FileInfo[] files = (new DirectoryInfo(initialDirectory)).GetFiles();
i have the following simple code, but it doesn,t work <ul> <li id=one onmouseover=this.style.background-color='white';>
I have the following code (correct for my simple tests) for a linked list
I have used following code to create a simple PDF file. It executes fine
I have the following code that fills dataTable1 and dataTable2 with two simple SQL
I have the following PHP code doing a very simple select into a table.
I have got the following very simple code: function init() { var articleTabs =
I have a simple 3D cube that I can rotate using the following code:
I have a simple DOM code like the following <div> <div> </div> </div> I

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.