title: Working with Xstream, clarification needed
body: <p>Consider a simple Xsctream example to create JSON out of the Bean:</p>
  
  <pre><code>Bean bean = new Bean();
  bean.addNames("John", "Doe");
  bean.addNames("Jane", "Doe");
  
  XStream xstream = new XStream(new JettisonMappedXmlDriver());    
  xstream.setMode(XStream.NO_REFERENCES);
  
  System.out.println(xstream.toXML(bean));
  </code></pre>
  
  <p>results in </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/jettison/mapped/Configuration
      at com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver.&lt;init&gt;(JettisonMappedXmlDriver.java:55)
      at Main.main(Main.java:12)
  </code></pre>
  
  <p>Note that <strong>libraries are imported</strong> as they should be</p>
  
  <pre><code>import com.thoughtworks.xstream.XStream;
  import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
  </code></pre>
  
  <p>And proper <strong>jars are included</strong></p>
  
  <p><img src="https://i.stack.imgur.com/HxYi1.png" alt="enter image description here"></p>