title: Migration to Jakarta: ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl
body: <p>While migrating from Java 8 to Java 11 and switching from EE to the newest Jakarta libraries according to <a href="https://wiki.eclipse.org/New_Maven_Coordinates" rel="noreferrer">https://wiki.eclipse.org/New_Maven_Coordinates</a> and Maven central, we get the following runtime exception in our (still SOAP-based) client application:</p>
  
  <pre><code>Exception in thread "main" javax.xml.ws.WebServiceException: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found
          at javax.xml.ws.spi.FactoryFinder$1.createException(FactoryFinder.java:31)
          at javax.xml.ws.spi.FactoryFinder$1.createException(FactoryFinder.java:28)
          at javax.xml.ws.spi.ServiceLoaderUtil.newInstance(ServiceLoaderUtil.java:73)
          at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:82)
          at javax.xml.ws.spi.Provider.provider(Provider.java:66)
          at javax.xml.ws.Service.&lt;init&gt;(Service.java:82)
          at [...]
  Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl
          at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
          at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
          at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
          at javax.xml.ws.spi.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:60)
          at javax.xml.ws.spi.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:93)
          at javax.xml.ws.spi.ServiceLoaderUtil.newInstance(ServiceLoaderUtil.java:71)
          ... 5 more
  </code></pre>
  
  <p>The solution described in <a href="https://stackoverflow.com/questions/49107375/getting-java-lang-classnotfoundexception-com-sun-xml-internal-ws-spi-providerim">Getting java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl despite the dependencies are defined</a> doesn't work and doesn't use Jakarta.</p>
  
  <p>If I'm not wrong, the Jarkarta libraries shouldn't contain "com.sun.xml."packages or reference such, but <em>javax.xml.ws.spi.Provider</em> obviously STILL DOES reference such class:</p>
  
  <pre><code>private static final String DEFAULT_JAXWSPROVIDER =
          "com.sun"+".xml.internal.ws.spi.ProviderImpl";
  </code></pre>
  
  <p>So, does anyone know if there is a Jakarta equivalent to the missing library containing ProviderImpl, or how I could workaround the problem with Jakarta?</p>
  
  <p>Thanks in advance!</p>