title: Trying to get JSON response with JavaEE JAX-B, Jasper and Glassfish 4.1.1, but I get error 500
body: <p>I am learning WebServices with JAX-B and Jasper. I can easily generate XML response, but I want to get JSON response, but I get error 500.</p>
  
  <p>Here is exception:</p>
  
  <pre><code>javax.servlet.ServletException:   org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError:    javax/xml/parsers/ParserConfigurationException
  root cause
  
  org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
  root cause
  
  java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
  root cause
  
   java.lang.ClassNotFoundException: javax.xml.parsers.ParserConfigurationException not found by org.eclipse.persistence.moxy [228]
  </code></pre>
  
  <p>Full server log: <a href="http://pastebin.com/Eq2KbyKJ" rel="nofollow">http://pastebin.com/Eq2KbyKJ</a></p>
  
  <p>Okey, I tried with Tomcat, and it works, it seems that is Glassfish related problem, but I want to use Glassfish as server, since I use EJB in my projects.</p>