title: Error in javax.xml.ws.Service initialization on App Engine
body: <p>I'm trying to connect to a SOAP server from GAE. See <a href="https://stackoverflow.com/questions/9003761/simple-curl-failing-from-linux-command-line/11321675#11321675">example</a>.
  It all works fine on the development server but on production I get a 500 error during initialization. After a lot of digging, I managed to catch a Throwable and log a stack trace:</p>
  
  <pre><code>java.lang.ExceptionInInitializerError
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
  at java.lang.Class.newInstance0(Class.java:372)
  at java.lang.Class.newInstance(Class.java:325)
  at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:58)
  at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:142)
  at javax.xml.ws.spi.Provider.provider(Provider.java:102)
  </code></pre>
  
  <p>This problem may be related to <a href="http://code.google.com/p/googleappengine/issues/detail?id=4910" rel="nofollow noreferrer">Issue 4910</a>. One suggestion there says:</p>
  
  <blockquote>
    <p>What I meant above is that you should not put any jar files
    implementing jaxws itself into your war. The App Engine runtime
    contains an implementation of jaxws and you should use that one.</p>
  </blockquote>
  
  <p>In my classpath I've found </p>
  
  <ol>
  <li>xml-apis-1.0.b2,=.jar</li>
  <li>jaxb-api.jar</li>
  <li>jaxb-impl.jar</li>
  </ol>
  
  <p>They don't look like jaxws implementations, well at least as far as I understand. Can't really do without jaxb (I get an error if I remove that jar).</p>
  
  <p>Any suggestion is welcome.</p>
  
  <p>[update]
  [It seems]<a href="http://code.google.com/p/googleappengine/issues/detail?id=4910#c41" rel="nofollow noreferrer">3</a> that just having jaxb in the classpath causes a problem so that GAE's jaxws implementation cannot be found.</p>
  
  <p><a href="https://stackoverflow.com/questions/8692865/how-does-java-initialize-the-jaxb-jax-ws-etc-implementation">This answer</a> is also useful to understand how jaxws initialzation works.</p>