title: FasterXML: Could not deserialize form XML to POJO
body: <p>I'm trying to deserialize XML.</p>
  
  <pre><code>&lt;server&gt;
      &lt;url&gt;localhost&lt;/url&gt;
      &lt;port&gt;8080&lt;/port&gt;
  &lt;/server&gt;
  </code></pre>
  
  <p>to POJO</p>
  
  <pre><code>class Storage {
      private Server server;
  }
  
  class Server {
      private String url;
      private Integer port;
  }
  </code></pre>
  
  <p>Here is my fire code</p>
  
  <pre><code>resources = new FileInputStream("/resources/config/" + file);
  mapper = new ObjectMapper();
  storage = mapper.readValue(resources, Storage.class);
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <pre><code>com.fasterxml.jackson.core.JsonParseException: Unexpected character ('&lt;' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
  </code></pre>
  
  <p>I tried to add JAX-B annotation to Storage and Server class, but the same error occurred.</p>
  
  <p><em>UPD</em></p>
  
  <p>When I add <code>mapper = new XmlMapper();</code> that I recieve <code>com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "url"</code></p>