title: Jackson JSON Processor: SerializationConfig.Feature.USE_ANNOTATIONS setted to false
body: <p>Hi I'm facing with a nasty problem while using Jackson JSON PRocessor with ObjectMapper class.
  This is my test class that should Serialize an Object (UserHeader) into a Json String.</p>
  
  <pre><code> import org.codehaus.jackson.map.ObjectMapper;
   import org.codehaus.jackson.map.SerializationConfig;
  
   public class TestJson {
  
     public static void main(String[] args) throws Exception {
              ObjectMapper mapper = new ObjectMapper();
              UserHeader userHeader = new UserHeader();
              userHeader.setFirstName("A");
              userHeader.setLastName("A1");
              userHeader.setSystem("2A");
  
              mapper.configure(SerializationConfig.Feature.USE_ANNOTATIONS, false);
              StringWriter sw = new StringWriter();
              mapper.writeValue(sw, userHeader);
              System.out.println(sw.toString());
      }
   } 
  </code></pre>
  
  <p>This is my UserHeader class with Annotations that are used from a different ObjectMapper (not this one)</p>
  
  <pre><code>  import org.codehaus.jackson.annotate.JsonIgnore;
    import org.codehaus.jackson.annotate.JsonProperty;
    import org.codehaus.jackson.map.annotate.JsonSerialize;
    import org.codehaus.jackson.map.annotate.JsonSerialize.Typing;
  
    @JsonSerialize(typing=Typing.STATIC)
    public class UserHeader implements Serializable,LoggedObject, MessagesInterface {
  
     private static final long serialVersionUID = 1L;
  
     private String system;
     private String userName;
     private String firstName;
     private String lastName;
  
         private List&lt;Scrivania&gt; scrivanie;
  
     public String getUserName() {
        return userName;
     }
  
     public void setUserName(String userName) {
      this.userName = userName;
     }
  
         @JsonProperty("Nome utente")
     public String getFirstName() {
      return firstName;
     }
  
     public void setFirstName(String firstName) {
      this.firstName = firstName;
     }
  
     @JsonProperty("Cognome utente")
     public String getLastName() {
      return lastName;
     }
     public void setLastName(String lastName) {
      this.lastName = lastName;
     }
  
        @JsonProperty("Scrivanie associate")
    public List&lt;Scrivania&gt; getScrivanie() {
      return scrivanie;
     }
     public void setScrivanie(List&lt;Scrivania&gt; scrivanie) {
      this.scrivanie = scrivanie;
     }
     @JsonProperty("Sistema (IAM o EDOC)")
     public String getSystem() {
      return system;
     }
     public void setSystem(String system) {
      this.system = system;
     }
  
     @Override
     @JsonIgnore
      public String getObjectId() {
      return this.userName;
     }
  
     @Override
     @JsonIgnore
     public Object getObjectData() {
      try {
          return this.clone();
      }
      catch (Exception e) {
          return null;
      }
     }
     @Override
     public String getName() {
      return this.userName;
      }
      }
  </code></pre>
  
  <p>However if I run the main method the system returns to me this exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.NullPointerException
  at org.codehaus.jackson.map.introspect.AnnotatedClass.resolveClassAnnotations(AnnotatedClass.java:295)
          at org.codehaus.jackson.map.introspect.AnnotatedClass.construct(AnnotatedClass.java:141)
          at org.codehaus.jackson.map.introspect.BasicClassIntrospector.forClassAnnotations(BasicClassIntrospector.java:185)
          at org.codehaus.jackson.map.introspect.BasicClassIntrospector.forClassAnnotations(BasicClassIntrospector.java:15)
          at org.codehaus.jackson.map.SerializationConfig.introspectClassAnnotations(SerializationConfig.java:661)
          at org.codehaus.jackson.map.ser.BasicSerializerFactory.createTypeSerializer(BasicSerializerFactory.java:180)
          at org.codehaus.jackson.map.ser.BeanSerializerFactory.findPropertyContentTypeSerializer(BeanSerializerFactory.java:406)
          at org.codehaus.jackson.map.ser.BeanSerializerFactory._constructWriter(BeanSerializerFactory.java:778)
          at org.codehaus.jackson.map.ser.BeanSerializerFactory.findBeanProperties(BeanSerializerFactory.java:608)
          at org.codehaus.jackson.map.ser.BeanSerializerFactory.constructBeanSerializer(BeanSerializerFactory.java:436)
          at org.codehaus.jackson.map.ser.BeanSerializerFactory.findBeanSerializer(BeanSerializerFactory.java:349)
          at org.codehaus.jackson.map.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:295)
          at org.codehaus.jackson.map.ser.StdSerializerProvider._createUntypedSerializer(StdSerializerProvider.java:778)
          at org.codehaus.jackson.map.ser.StdSerializerProvider._createAndCacheUntypedSerializer(StdSerializerProvider.java:731)
          at org.codehaus.jackson.map.ser.StdSerializerProvider.findValueSerializer(StdSerializerProvider.java:369)
          at http://stackoverflow.com/questions/6661717/how-to-process-an-invalid-value-with-jackson-json-processororg.codehaus.jackson.map.ser.StdSerializerProvider.findTypedValueSerializer(StdSerializerProvider.java:452)
          at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:597)
          at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:280)
          at org.codehaus.jackson.map.ObjectMapper._configAndWriteValue(ObjectMapper.java:2260)
          at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1813)
          at it.unina.edoc.json.TestJson.main(TestJson.java:65)
  </code></pre>
  
  <p>I have no idea about this exception because @Annotations should be ignored due to USE_ANNOTATION false config.
  Moreover if I set USE_ANNOTATION to true the error disappears.
  I have these jars on my buildpath:</p>
  
  <ul>
  <li>jackson-core-asl-1.8.3.jar</li>
  <li>jackson-jaxrs-1.8.3.jar</li>
  <li>jackson-mapper-asl-1.8.3.jar </li>
  <li>jackson-xc-1.8.3.jar</li>
  </ul>