StringOutOfBoundException in ProcessGraphMessage while processing the address headers

StringOutOfBoundException in ProcessGraphMessage while processing the address headers

Issue:

While Fetching some mails using graph we experience mail fetching stopping issue while processing the address headers of the mail.

  1. [08:07:18:693]|[09-20-2023]|[com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask]|[SEVERE]|[108]: Exception while starting MailFetching Schedule. Exception is : String index out of range: -1|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: java.lang.StringIndexOutOfBoundsException: String index out of range: -1|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:935)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.lang.StringBuilder.substring(StringBuilder.java:81)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:881)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.lang.StringBuilder.substring(StringBuilder.java:81)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.manageengine.servicedesk.mail.core.ProcessGraphMessage.parseAddress(ProcessGraphMessage.java:432)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.manageengine.servicedesk.mail.core.ProcessGraphMessage.loadProperties(ProcessGraphMessage.java:104)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.manageengine.servicedesk.mail.core.ProcessMessageHandler.loadPropertiesIntoBean(ProcessMessageHandler.java:95)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.manageengine.servicedesk.mail.core.ProcessMessageHandler.loadProperties(ProcessMessageHandler.java:47)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.adventnet.servicedesk.mailutils.MailProcessor.processEMail(MailProcessor.java:56)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.manageengine.servicedesk.mail.core.fetcher.GraphMailFetcher.fetchAndProcessMails(GraphMailFetcher.java:108)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.manageengine.servicedesk.mail.core.fetcher.MailFetcher.startFetching(MailFetcher.java:306)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask.executeTask(MailFetchingTask.java:39)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.adventnet.taskengine.internal.SchedulerBean.executeTask(SchedulerBean.java:641)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.lang.reflect.Method.invoke(Method.java:498)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.adventnet.mfw.bean.BeanProxy.lambda$invoke$0(BeanProxy.java:51)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.zoho.mickey.api.DefaultCodeBlock.execute(CodeBlock.java:453)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.adventnet.mfw.bean.BeanProxy.invoke(BeanProxy.java:48)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.sun.proxy.$Proxy5.executeTask(Unknown Source)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.adventnet.taskengine.internal.ScheduleExecutor.executeNextTask(ScheduleExecutor.java:334)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at com.adventnet.taskengine.internal.ScheduleExecutor.run(ScheduleExecutor.java:225)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)|
    [08:07:18:693]|[09-20-2023]|[SYSERR]|[INFO]|[108]: 	at java.lang.Thread.run(Thread.java:750)|
    [08:07:18:693]|[09-20-2023]|[com.manageengine.servicedesk.mail.core.fetcher.MailFetcher]|[INFO]|[108]: threadName from Map::null and currentThreadName::MailFetching_4 are different. So not removing entry from Map|

Fix:

If respective address fields are not given we will mark that address fields as empty string("") which is considered as "Not Provided".

Issue ID: SD-113146

Steps to apply the fix

1. Download the attached 14304_9168105.fjar file.
2. Click here on steps to apply the fjar file.
3. Restart the application service.
4. Check whether the issue is resolved.
5. If the issue occurs again, immediately zip the logs (<server_home>\logs folder. For eg: C:\Program Files\ManageEngine\ServiceDesk\logs folder) and share it with us for analysis.


Build
Compatible Jar
14304
113146_14304.fjar
14501,14502,14503
 113146_14501_14503.fjar



                  New to ADSelfService Plus?

                    • Related Articles

                    • StringOutOfBoundException in ProcessGraphMessage while processing the address headers

                      Issue: While Fetching some mails using graph we experience mail fetching stopping issue while processing the address headers of the mail. [08:07:18:693]|[09-20-2023]|[com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask]|[SEVERE]|[108]: ...
                    • Query to remove headers from all form of exported reports (MSSQL & PGSQL)

                      We can remove header in reports by execute the below query. This will remove headers in all format of reports like csv , xls ,html and pdf. For PGSQL: update customreportsettings set removetitle='t'; For MSSQL: update customreportsettings set ...
                    • Fix: Failed to parse To/Cc address while fetching mails using Graph

                      Issue: If the To / Cc address contains the email address in the format "Test, SDP" <test@sdp.com> (containing "," character in the email address itself), then parsing of such addresses using Microsoft Graph fails in SDP. If such address is a support ...
                    • Missing Whitespace Character

                      Issue: When the mails are fetched using EWS, the mail processing skips the whitespace (blank space) character in certain scenarios. (Example case: Two different words get merged into a single word). Resolution: The fix for the issue has been attached ...
                    • Error when Processing Request during Upgrade - Version8121 - 11

                      Error:  While upgrading 8121 to 11011 when you get the below shown error,  Cause of the error: The issue with the Upgrade is that the System defined user kept getting deleted and it was because of data anonymization.   Solution : In 8121,  Go to ...