3 Replies Latest reply on Jul 26, 2016 3:29 PM by Dave Godbey

    Remove jaxws from Wildfly 10 for Exchange Web Service client

    Dave Godbey Newbie

      I manage and maintain a couple of components that do business processing around user submissions through a Microsoft Exchange Server. To do this, I have written a servlet that functions as an Exchange Web Services, EWS, client. There are some eccentricities in the system resulting in my inability to leverage JAXWS as provided by Wildfly. However, JAXWS as provided by the Java 8 JDK itself works fine. I had and solved the same issue in JBoss 6.

       

      What I need to do is remove JAXWS from Wildfly. Currently I am fumbling my way through, removing modules containing the offending jars, Wildfly complaining and refusing to start. Has the removal of JAXWS been addressed and documented anywhere? Currently I"m starting with configuration standalone-full.xml.

       

      Thanks!

        • 1. Re: Remove jaxws from Wildfly 10 for Exchange Web Service client
          Tomaz Cerar Master

          remove jaxrs subsystem from standalone-full.xml and you should be done.

          • 2. Re: Remove jaxws from Wildfly 10 for Exchange Web Service client
            Dave Godbey Newbie

            Thank you Tomaz. I removed jaxrs subsystem from standalone-full.xml. Not quite there. Now getting this error:

            10:13:08,505 ERROR [stderr] (Thread-113) Exception in thread "Thread-113" java.lang.NoClassDefFoundError: com/sun/xml/internal/ws/client/ClientTransportException

            10:13:08,506 ERROR [stderr] (Thread-113)     at gov.nasa.hq.calendar.exchange.cron.CronTimerThread$JobThread.getEvents(CronTimerThread.java:122)

            10:13:08,506 ERROR [stderr] (Thread-113)     at gov.nasa.hq.calendar.exchange.cron.CronTimerThread$JobThread.run(CronTimerThread.java:115)

            10:13:08,507 ERROR [stderr] (Thread-113) Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.ws.client.ClientTransportException from [Module "deployment.hq_exchangeCron.ear.hq_exchangeCron.war:main" from Service Module Loader]

            10:13:08,507 ERROR [stderr] (Thread-113)     at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)

            10:13:08,507 ERROR [stderr] (Thread-113)     at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)

            10:13:08,508 ERROR [stderr] (Thread-113)     at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)

            10:13:08,508 ERROR [stderr] (Thread-113)     at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)

            10:13:08,508 ERROR [stderr] (Thread-113)     ... 2 more

             

            This class, com.sun.xml.internal.ws.client.ClientTransportException is nowhere to be found in the wildfly 10, including my application, stack, but it does exist in rt.jar. I understand that by design, rt.jar is not included in the classpath. I could create a system dependency, but before that, I figured it would be simpler to just put rt.jar in my app lib directory. I did that, restarted wildfly, but same error.

             

            Do you know what I'm missing? The contents of my jboss-deployment-structure file

            <jboss-deployment-structure>

            <!-- $Id: jboss-deployment-structure.xml 10820 2016-03-08 19:43:14Z dgodbey $ -->

              <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

              <deployment>

              </deployment>

              <sub-deployment name="hq_calendarApi.war">

                <dependencies>

                  <module name="javax.wsdl4j.api" />

                  <module name="org.jboss.remote-naming" />

                  <module name="org.hibernate" />

                </dependencies>

              </sub-deployment>

            </jboss-deployment-structure>

            • 3. Re: Remove jaxws from Wildfly 10 for Exchange Web Service client
              Dave Godbey Newbie

              It turns out that the classloaders were behaving properly. I just needed to figure it out. And I had to get pieces of rt.jar into the app. For more on that, see message=960550.

               

              And I will say that just today have I come to the conclusion that what you did in the transition of JBoss 6.x to Wildfly (10 I'm using) with respect to classloading seems to be rock solid. I've been struggling for a while to understand it, but I think I have finally figured it out. And I like it. Nicely done.

               

              Thanks for your help.

              Dave