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

getting null pointer on api.messages().sendTemplate() method #100

Open
ihalilaltun opened this issue Sep 2, 2019 · 3 comments
Open

getting null pointer on api.messages().sendTemplate() method #100

ihalilaltun opened this issue Sep 2, 2019 · 3 comments

Comments

@ihalilaltun
Copy link

We are using the framework for more than 1 year without any problem, but recently we are getting following error without any stack trace. Since we cannot get any detailed log messages we cannot find the exact problem, is it mandrill itself or the data we send to mandrill. Any help appriciated.

java.lang.NullPointerException: null
	at com.microtripit.mandrillapp.lutung.model.MandrillRequestDispatcher.execute(MandrillRequestDispatcher.java:124) ~[lutung-0.0.8.jar!/:?]
	at com.microtripit.mandrillapp.lutung.controller.MandrillUtil.query(MandrillUtil.java:44) ~[lutung-0.0.8.jar!/:?]
	at com.microtripit.mandrillapp.lutung.controller.MandrillMessagesApi.sendTemplate(MandrillMessagesApi.java:212) ~[lutung-0.0.8.jar!/:?]
	at com.microtripit.mandrillapp.lutung.controller.MandrillMessagesApi.sendTemplate(MandrillMessagesApi.java:139) ~[lutung-0.0.8.jar!/:?]
	at com.segmentify.lotr.legolas.worker.MailSender.lambda$send$2(MailSender.java:143) ~[classes!/:0.0.1-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
@ihalilaltun
Copy link
Author

@rschreijer any comments?

@thonier
Copy link

thonier commented Dec 18, 2019

Not sure if this is relevant to anyone, but we also began to observe the issue intermittently on some of our machines. In our case it turned out to be an issue occurring when a proxy was detected. The reason is that on this line:

httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,

getParams() is now deprecated so this essentially fails.

We put in a workaround to ignore the proxy selection for "mandrillapp.com" and that was good enough for us.

Hope this helps, but it would be nice if someone could update the code at some point.

@pv-pavan
Copy link

#103 This should fix. Please build from https://github.com/pv-pavan/lutung

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

No branches or pull requests

3 participants