1 Reply Latest reply on Sep 16, 2018 1:00 PM by ralph Soika

    Wildfly 13 - javax.ws.rs.client.ClientBuilder not working from a Timer Service?

    ralph Soika Apprentice


      I have a strange problem. I am running a timer service in wildfly 13. This timer service is implemented as stateless EJB like this:


      public class SchedulerService {
       void onTimeout(javax.ejb.Timer timer) throws Exception {
          Client client = ClientBuilder.newClient();
          // throws exception


      The call 'ClientBuilder.newClient()' result in the following exception:


      org.jboss.resteasy.spi.LoggableFailure: RESTEASY003880: Unable to find contextual data of type: javax.servlet.ServletContext


      I have them code in Glassfish (Jersey) running with not problems.

      What does the exception exactly mean? And what can I do to get an instance of a javax.ws.rs.client.Client?


      Thanks for any help