Mail Fetching : Inline Image URL Replace error.

Mail Fetching : Inline Image URL Replace error.

Issue:
Mail fetching is stopping due to inline image Handling. The problem with replacing inline image URLs is the underlying cause of the issue. The issue will occur during addition of conversation not in new request creation.

ErrorTrace:
java.lang.NumberFormatException: For input string: "098f121299a04f708cb00ed4b247e42a.png"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.valueOf(Long.java:803)
at com.manageengine.servicedesk.v3api.utils.InlineImageUtil.getMediaIdFromMediaUrl(InlineImageUtil.java:631)
at com.manageengine.servicedesk.v3api.utils.InlineImageUtil.handleHTMLContent(InlineImageUtil.java:362)
at com.manageengine.sdpod.v3api.handlerimpl.DefaultEntityHandler.processInlineMediaFiles(DefaultEntityHandler.java:2066)
at com.manageengine.sdpod.v3api.handlerimpl.DefaultEntityHandler.handleHTMLContent(DefaultEntityHandler.java:2019)
at com.manageengine.sdpod.v3api.handlerimpl.RequestNotificationHandler.handleHTMLContent(RequestNotificationHandler.java:220)
at com.manageengine.sdpod.v3api.handlerimpl.PreDefaultEntityHandler.add(PreDefaultEntityHandler.java:273)
at com.manageengine.sdpod.v3api.handlerimpl.RequestNotificationHandler.add(RequestNotificationHandler.java:73)
at com.manageengine.sdpod.v3api.handler.AbstractEntityHandler.handleAPICall(AbstractEntityHandler.java:104)
at com.manageengine.common.util.CommonAPIUtil.invokeAPICall(CommonAPIUtil.java:96)
at com.manageengine.servicedesk.v3api.utils.SDPAPIUtil.invokeAPIInternally(SDPAPIUtil.java:998)
at com.manageengine.servicedesk.v3api.utils.SDPAPIUtil.invokeAddAPI(SDPAPIUtil.java:888)
at com.manageengine.sdpod.v3api.workflow.action.InternalAPICallActionDispatcher.fireAction(InternalAPICallActionDispatcher.java:293)
at com.manageengine.sdpod.v3api.workflow.action.AbstractActionDispatcher.fire(AbstractActionDispatcher.java:127)
at com.manageengine.sdpod.v3api.workflow.action.InternalAPICallActionDispatcher.invokeInternalAPICall(InternalAPICallActionDispatcher.java:409)
at com.manageengine.sdpod.v3api.workflow.action.InternalAPICallActionDispatcher.invokeInternalAPICall(InternalAPICallActionDispatcher.java:392)
at com.manageengine.sdpod.v3api.workflow.action.InternalAPICallDetail$InternalAPICallBuilder.buildAndInvoke(InternalAPICallDetail.java:310)
at com.manageengine.servicedesk.mailutils.RequestMailUtil.addConversationViaAPI(RequestMailUtil.java:2086)
at com.manageengine.servicedesk.mailutils.RequestMailHandler.processRequestAddition(RequestMailHandler.java:543)
at com.manageengine.servicedesk.mailutils.RequestMailHandler.handleMailObject(RequestMailHandler.java:234)
at com.manageengine.servicedesk.mailutils.ModuleHandler.handleMailObject(ModuleHandler.java:121)
at com.adventnet.servicedesk.mailutils.MailProcessor.processEMail(MailProcessor.java:71)
at com.manageengine.servicedesk.mail.core.fetcher.EwsMailFetcher.fetchAndProcessMails(EwsMailFetcher.java:159)
at com.manageengine.servicedesk.mail.core.fetcher.MailFetcher.startFetching(MailFetcher.java:306)
at com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask.executeTask(MailFetchingTask.java:39)
at com.adventnet.taskengine.internal.SchedulerBean.executeTask(SchedulerBean.java:641)
at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.adventnet.mfw.bean.BeanProxy.lambda$invoke$0(BeanProxy.java:51)
at com.zoho.mickey.api.DefaultCodeBlock.execute(CodeBlock.java:453)
at com.adventnet.mfw.bean.BeanProxy.invoke(BeanProxy.java:48)
at com.sun.proxy.$Proxy4.executeTask(Unknown Source)
at com.adventnet.taskengine.internal.ScheduleExecutor.executeNextTask(ScheduleExecutor.java:334)
at com.adventnet.taskengine.internal.ScheduleExecutor.run(ScheduleExecutor.java:225)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)


Fix:
Apply the attached fix jar to resolve the issue.

Note:
Before applying the .fjar file, kindly verify its compatibility in the "Jar Compatibility" section below.


Steps to apply the fix:
1. Download the attached .fjar file.
2. Click here for steps to apply the .fjar file.
3. Restart the application service.
4. If the issue occurs again, enable the email debug in the application, recreate the issue after enabling the email debug then immediately zip the logs (<server_home>\logs folder. For eg: C:\Program Files\ManageEngine\ServiceDesk\logs folder) and share it with us for analysis. If the size of the log file is huge, you can send it to us using our FTP link https://bonitas2.zohocorp.com/. Select the product as "ServiceDesk Plus" and provide the proper ticket number.

Jar Compatibility:

Build
Compatible Jar
14503
14503_9323935_imageUrl_replace.fjar
14504, 14505, 14506 & 14600
14504_imageUrl_replace.fjar


Issue ID:
SD-114787
Please verify the mentioned issue ID in the readme. If it's not listed, please wait while we address the issue. Once the fix is implemented in a build, we will update the issue ID in the readme.​


                  New to ADSelfService Plus?