Hi,

i am trying to borrow object from GenericObjectPool i am not able to do so.below is the code used to borrow object.
Client client = (Client) RestfulClientPool.getPool().borrowObject();
HTTPBasicAuthFilter authFilter = new HTTPBasicAuthFilter("user", "123456");
client.addFilter(authFilter);

i am using the POOL from below method.

public static RestfulClientPool getPool() {
if (pool == null) {
pool = new RestfulClientPool(new RestfulClientFactory());
pool.setMaxActive(100);
pool.setMaxIdle(100);
pool.setMaxWait(5000);
}
return pool;
}

i am getting NullPointer Exception in the below line

client.addFilter(authFilter);

kindly help.