title: Serializing with Jackson (JSON) - getting "No serializer found"?
body: <p>I get the an exception when trying to serialize a very simple object using Jackson. The error:</p>
  
  <blockquote>
    <p>org.codehaus.jackson.map.JsonMappingException: No serializer found for
    class MyPackage.TestA and no properties
    discovered to create BeanSerializer (to avoid exception, disable
    SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) )</p>
  </blockquote>
  
  <p>Below is the simple class and code to serialize. </p>
  
  <p>Can anyone tell my why I get this error?</p>
  
  <pre><code>public class TestA {
      String SomeString = "asd";
  }
  
  TestA testA = new TestA();
  ObjectMapper om = new ObjectMapper();
  try {
      String testAString = om.writeValueAsString(testA); // error here!
  
      TestA newTestA = om.readValue(testAString, TestA.class);
  } catch (JsonGenerationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  } catch (JsonMappingException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  </code></pre>