Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MandrillRequestDispatcher.execute throwing NPE #88 #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pv-pavan
Copy link

httpClient.getParams() being deprecated, adding http.proxy breaks flow with a NullPointerException.

Steps to reproduce

Build a java application using library version 0.0.8 and set proxy -Dhttp.proxyHost=<> Dhttp.proxyPort=<> in vm args

Issue:

java.lang.NullPointerException: null
at com.microtripit.mandrillapp.lutung.model.MandrillRequestDispatcher.execute(MandrillRequestDispatcher.java:124) ~[lutung-0.0.8.jar!/:na]
at com.microtripit.mandrillapp.lutung.controller.MandrillUtil.query(MandrillUtil.java:44) ~[lutung-0.0.8.jar!/:na]
at com.microtripit.mandrillapp.lutung.controller.MandrillMessagesApi.send(MandrillMessagesApi.java:100) ~[lutung-0.0.8.jar!/:na]
at com.microtripit.mandrillapp.lutung.controller.MandrillMessagesApi.send(MandrillMessagesApi.java:55) ~[lutung-0.0.8.jar!/:na]

Fix:

Build the httpClient using the recommended 'RequestConfig' way of setting the proxy host.

@dnovitski
Copy link

Thank you! This fix is desperately needed in the master branch and as new release! Without this using modern apache httpclient will throw this NPE.

ping @rschreijer

@lc-nyovchev
Copy link
Contributor

@dnovitski and @pv-pavan if you look in the README.md, you'd see:

NOTE: this project is no longer maintained.

I am not sure if @rschreijer is merging PRs on it though, but I wouldn't put my money on it since the last commits (apart from the update of the Readme happened) 2-3 years ago.

@dnovitski
Copy link

You're right. I've forked the project and working on getting it released under a new groupid

@dnovitski
Copy link

dnovitski commented Sep 30, 2020

It's released!

Fork: https://github.com/dnovitski/lutung

<dependency>
    <groupId>io.github.dnovitski</groupId>
    <artifactId>lutung</artifactId>
    <version>0.0.9</version>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants