title: java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.bind.api.JAXBRIContext
body: <p>I created a jaxws web service. I totally followed the <a href="http://www.mkyong.com/webservices/jax-ws/jax-ws-java-web-application-integration-example/" rel="nofollow">url</a></p>
  
  <p>The service was up perfectly without any error. But the server having errors when request hit it.</p>
  
  <pre><code>SEVERE: caught throwable
  java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.bind.api.JAXBRIContext
      at com.sun.xml.ws.db.glassfish.JAXBRIContextFactory.newContext(JAXBRIContextFactory.java:74)
      at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:149)
      at com.sun.xml.ws.message.jaxb.JAXBMessage.create(JAXBMessage.java:160)
      at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAP11Fault(SOAPFaultBuilder.java:433)
      at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:210)
  </code></pre>
  
  <p>I checked through out stackoverflow and many other sites all says jar file conflict. <br>
  I use java-6-openjdk. <br> 
  and below is my jar file list in the jetty server.</p>
  
  <blockquote>
    <p>gmbal-api-only.jar <br> ha-api.jar<br> jaxb-core.jar <br>
    jaxb-impl.jar <br> jaxws-rt.jar <br> management-api.jar <br>
    policy-2.3.1.jar <br> stax-ex.jar <br> streambuffer-1.5.1.jar <br></p>
  </blockquote>
  
  <p>Since above jars are not working I tried with  <br>
  Go <a href="http://jax-ws.java.net/" rel="nofollow">here</a> <br>
  Download JAX-WS RI distribution. <br></p>
  
  <p>But those jars gave the same error.</p>