title: JAXB and LinkedHashMap: XML serialization failure
body: <p>I am having a similar issue that's been discussed here: <a href="https://stackoverflow.com/questions/33950587/com-sun-istack-saxexception2-class-java-util-linkedhashmap-nor-any-of-its-super">com.sun.istack.SAXException2: class java.util.LinkedHashMap nor any of its super class is known to this context</a></p>
  
  <p>Basically: using JAXB, I want to serialize a 'complex' POJO that's been generated by XJC (and xsd schemas) to XML but the conversion fails with the error:</p>
  
  <pre><code>Caused by: javax.xml.bind.JAXBException: class java.util.LinkedHashMap nor any of its super class is known to this context.
  </code></pre>
  
  <p>The POJO is complex in the sense that it has fields with type <code>List&lt;Object&gt;</code> that in runtime gets instantiated to a <code>List&lt;LinkedHashMap&lt;Category&gt;&gt;</code>. Thus it appears that JAXB does not know how to convert this to XML.</p>
  
  <p>When I add LinkedHashMap.class to the JAXB Context, the serialization succeeds but the xml is incomplete:</p>
  
  <p><code>&lt;response&gt;
              &lt;Common Version="1.1" Lang="EN"&gt;
                  &lt;Option xsi:type="linkedHashMap"/&gt;
              &lt;/Common&gt;
  &lt;/response&gt;</code></p>
  
  <p>The <code>&lt;Common&gt;</code> node is incomplete because it is serializing <code>Option</code> but not <code>Category</code>.</p>
  
  <p>Is this a known issue with JAXB? That it doesn't support serialization of LinkedHashMap data types?</p>
  
  <p>Thank you.</p>