Absent Member.. abhishekkumar Absent Member..
Absent Member..
338 views

An Unhandled Exception occurs while sending mail java.lang.NullPointerException

Hi,

We recently upgraded to PPM 9.32 from PPM 9.22 version and we have been experiencing a strange issue because of which PPM instance is going down every 24-48 hours and the whole serverLog.txt files are filled with errors like below.

 

ERROR :ppmLightServiceListenerContainer-1:(SMTPClient.java:258):2016/08/21-22:06:00.373 PDT: An Unhandled Exception occurs while sending mail
java.lang.NullPointerException
at com.kintana.core.net.SMTPClient.getMimeMessage(SMTPClient.java:292)
at com.kintana.core.net.SMTPClient.sendMessage(SMTPClient.java:226)
at com.kintana.core.server.EmailNotificationAgent.sendEmailImmediateOnly(EmailNotificationAgent.java:1077)
at com.kintana.core.server.EmailNotificationAgent.runService(EmailNotificationAgent.java:1279)
at com.mercury.itg.core.jms.service.impl.GenericServiceMessageHandler.handleMessage(GenericServiceMessageHandler.java:71)
at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
at com.mercury.itg.core.monitor.impl.BackgroundServiceMonitorAspect.monitorService(BackgroundServiceMonitorAspect.java:115)
at sun.reflect.GeneratedMethodAccessor262.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy140.handleMessage(Unknown Source)
at com.mercury.itg.core.jms.service.impl.ServiceMessageListenerImpl.onServiceMessage(ServiceMessageListenerImpl.java:360)
at com.mercury.itg.core.jms.service.impl.ServiceMessageListenerImpl.onMessage(ServiceMessageListenerImpl.java:184)
at sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at com.sun.proxy.$Proxy142.onMessage(Unknown Source)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
at com.mercury.itg.core.jms.service.impl.ServiceMessageListenerContainer.access$2000(ServiceMessageListenerContainer.java:40)
at com.mercury.itg.core.jms.service.impl.ServiceMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(ServiceMessageListenerContainer.java:947)
at com.mercury.itg.core.jms.service.impl.ServiceMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(ServiceMessageListenerContainer.java:939)
at com.mercury.itg.core.jms.service.impl.ServiceMessageListenerContainer$AsyncMessageListenerInvoker.run(ServiceMessageListenerContainer.java:845)
at java.lang.Thread.run(Thread.java:744)

I am not sure what is the root cause of this. I checked the Audit Services page and it seems that notification service is showing exceptions on every run.

Any idea what is the issue?

Thanks and Regards,

Abhishek Kumar

0 Likes
1 Reply
knsub Super Contributor.
Super Contributor.

Re: An Unhandled Exception occurs while sending mail java.lang.NullPointerException

Hello Abhishek,

There could be pending notifications in the KNTA_NOTIF_TXN_PARENTS table. Check this table which has a column NOTIFICATION_SENT_FLAG having values 'N' and 'Y'.
The default value is set to 'N' when a notification is generated and once the notification is sent to the SMTP server the value of this flag is set to 'Y'.

If you find any old records with the NOTIFICATION_SENT_FLAG as 'N' we need to correct this.

Also check if there are any invalid e-mail addresses in the KNTA_NOTIF_TXN_RECIPIENTS table.

Hope this helps.

Thanks,
Subash

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.