cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiren Pillay <>
Subject NullPointerException with WebClient
Date Mon, 11 Aug 2014 16:19:06 GMT
Hi Sergey,

I am getting a NPE when I use the WebClient as a self-standing
application. We're using Maven and the jar-with-dependencies option
for this client.

It looks like a dependency issue, because if I run the app in my IDE
it works fine. When I run the self-packaged jar it fails. What
dependency could I be missing?

CXF 3.0.1

  protected static PhaseInterceptorChain
setupOutInterceptorChain(ClientConfiguration cfg) {
        PhaseManager pm = cfg.getBus().getExtension(PhaseManager.class);
        List<Interceptor<? extends Message>> i1 =
        List<Interceptor<? extends Message>> i2 = cfg.getOutInterceptors();
        List<Interceptor<? extends Message>> i3 =
  ****Fails here -->     PhaseInterceptorChain chain = new
PhaseChainCache().get(pm.getOutPhases(), i1, i2, i3);
        chain.add(new ClientRequestFilterInterceptor());
        return chain;


Performing GET against URL:
    at org.apache.cxf.jaxrs.client.AbstractClient.setupOutInterceptorChain(
    at org.apache.cxf.jaxrs.client.AbstractClient.createMessage(
    at org.apache.cxf.jaxrs.client.WebClient.finalizeMessage(
    at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(
    at org.apache.cxf.jaxrs.client.WebClient.doInvoke(
    at org.apache.cxf.jaxrs.client.WebClient.doInvoke(
    at org.apache.cxf.jaxrs.client.WebClient.invoke(
    at org.apache.cxf.jaxrs.client.WebClient.get(

View raw message