On 2023-03-16, Kamran Manzoor wrote: > I am new to Apache Ivy and I am using it to manage dependency in one of my > ant projects. All I want is to retrieve a jar from a custom URL (Bitbucket) > which requires Basic Authentication. However, I am getting > NullPointerException when I am trying to retrieve the jar with version > *2.5.1*.
> *java.lang.NullPointerException at > org.apache.ivy.util.url.HttpClientHandler.getURLInfo(HttpClientHandler.java:243)* > I don't get NPE with *2.4.0* version of ivy but it does not send > credentials in the header. Any pointers/help will be greatly appreciated. I > have attached the simple example files here along with log files of both > the versions to reproduce the issue. Ant version is *1.10.7* for me. I can reproduce the problem you see (and will open a JIRA ticket attaching oyur files) when using Apache HttpClient. Everything works as expected when not using Apache HttpClient but the "normal" java.net.URLConnection based code path. At least I dodn't get any exception, I haven't checked whether the credentials are included. Maybe you can use this as a workaround until we get the bug fixed and a patched release out. Stefan