title: websphere 8.5.5 jaxws-rt: java.lang.NoClassDefFoundError: com.sun.xml.ws.spi.ProviderImpl
body: <p>i have to migrate my ear project from JBoss to WebSphere 8.5.5.</p>
  
  <p>My webService (I use jax-ws) is correctly deployed and I can invoke it with no error, but, when I try to invoke an external webService, i get the following error</p>
  
  <pre><code>java.lang.NoClassDefFoundError: com.sun.xml.ws.spi.ProviderImpl (initialization failure)
  at java.lang.J9VMInternals.initialize(J9VMInternals.java:176)
  at java.lang.J9VMInternals.newInstanceImpl(Native Method)
  at java.lang.Class.newInstance(Class.java:1564)
  at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
  at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
  at javax.xml.ws.spi.Provider.provider(Provider.java:82)
  at javax.xml.ws.Service.&lt;init&gt;(Service.java:56)
  </code></pre>
  
  <p>jaxws-rt is in WEB-INF/lib directory, and I can use other classes from that library. I tried with a simple:</p>
  
  <pre><code>Class.forName("com.sun.xml.ws.Closeable").getProtectionDomain().getCodeSource().getLocation().getPath()
  </code></pre>
  
  <p>Wich returns the expected path:</p>
  
  <pre><code>/opt/IBM/WAS8.5_1/AppServer/profiles/AppSrv01_1/installedApps/svr04Cell02_1/MyEar.ear/MyWebService.war/WEB-INF/lib/jaxws-rt-2.1.4.jar
  </code></pre>
  
  <p>This means that jaxws-rt is in my classpath. So, why can't I see ProviderImpl class?</p>
  
  <p>Thanks in advance</p>