Skip to content

MandrillRequestDispatcher.execute throwing NPE #88#103

Open
pv-pavan wants to merge 1 commit into
rschreijer:masterfrom
pv-pavan:master
Open

MandrillRequestDispatcher.execute throwing NPE #88#103
pv-pavan wants to merge 1 commit into
rschreijer:masterfrom
pv-pavan:master

Conversation

@pv-pavan

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

@dnovitski

dnovitski commented Sep 30, 2020

Copy link
Copy Markdown

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