Set the connector to the ClientConfig
not other way around (ConnectorProvider#getConnector
isn't supposed to be called by users but by Jersey Client, it's part of SPI):
ClientConfig clientConfig = new ClientConfig();
clientConfig.connectorProvider(new ApacheConnectorProvider());
Client client = ClientBuilder.newClient(clientConfig);
This is described in Jersey User Guide - Client Transport Connectors.