pbustin Outstanding Contributor.
Outstanding Contributor.
3503 views

EmailResponse template error: "String index out of range: 4"

Jump to solution
Although my emailresponse template worked a couple of times (I don't know why), I'm getting the following error:

"String index out of range: 4"

Details:

00000 INFO 24-03-2016 09:20:30 [Notifications] -- Notification 'TS HD: A Help Desk item was submitted by an end user (Phil)' being sent on Tbl:ItemId 1003:44039 for all recipients
00000 INFO 24-03-2016 09:20:30 [Notifications] -- Added event 324632, Tbl:ItemId 1003:44039, to events table for notification 'TS HD: A Help Desk item was submitted by an end user (Phil)'
00000 INFO 24-03-2016 09:20:30 [Events] -- Initial send for event 324632, Tbl:ItemId 1003:44039, sending notification 'TS HD: A Help Desk item was submitted by an end user (Phil)'
00000 ERROR 24-03-2016 09:20:30 [Events] -- Failed to format e-mail message.
java.lang.StringIndexOutOfBoundsException: String index out of range: 4
at java.lang.String.substring(String.java:1907)
at com.serena.sbm.ns.templates.renderers.NotificationTemplateTagRenderer_EMAILRESPONSE.createBaseUrl(NotificationTemplateTagRenderer_EMAILRESPONSE.java:127)
at com.serena.sbm.ns.templates.renderers.NotificationTemplateTagRenderer_EMAILRESPONSE.render(NotificationTemplateTagRenderer_EMAILRESPONSE.java:72)
at com.serena.sbm.ns.templates.NotificationTemplateTagRenderer.render(NotificationTemplateTagRenderer.java:27)
at com.serena.sbm.ns.templates.TagDispatcher.renderTag(TagDispatcher.java:209)
at com.serena.sbm.ns.templates.FileTemplate.renderTag(FileTemplate.java:272)
at com.serena.sbm.ns.templates.FileTemplate.process(FileTemplate.java:235)
at com.serena.sbm.ns.templates.EmailTemplate.process(EmailTemplate.java:131)
at com.serena.sbm.ns.templates.ServicesTemplate.process(ServicesTemplate.java:77)
at com.serena.sbm.ns.templates.NotificationTemplate.process(NotificationTemplate.java:234)
at com.serena.sbm.ns.process.EMailEventService.formatMailMessage(EMailEventService.java:577)
at com.serena.sbm.ns.process.EMailEventService.sendMessage(EMailEventService.java:429)
at com.serena.sbm.ns.process.EMailEventService.sendEvent(EMailEventService.java:334)
at com.serena.sbm.ns.process.EMailEventService.sendNotification(EMailEventService.java:152)
at com.serena.sbm.ns.process.EventServiceImpl.process(EventServiceImpl.java:384)
at com.serena.ns.core.job.NSProcessJob.execute(NSProcessJob.java:58)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
00000 ERROR 24-03-2016 09:20:30 [Events] -- An error occurred while processing the 'TS HD: A Help Desk item was submitted by an end user (Phil)' notification for the 'Phil Bustin' user.
0 Likes
1 Solution

Accepted Solutions
Highlighted
pbustin Outstanding Contributor.
Outstanding Contributor.

Re: EmailResponse template error: "String index out of range: 4"

Jump to solution
Lo and behold, it worked when I restored some lines I took out. Unless it's a coincidence, I'll test removing/modifying a line at a time and see what happens.

View solution in original post

0 Likes
1 Reply
Highlighted
pbustin Outstanding Contributor.
Outstanding Contributor.

Re: EmailResponse template error: "String index out of range: 4"

Jump to solution
Lo and behold, it worked when I restored some lines I took out. Unless it's a coincidence, I'll test removing/modifying a line at a time and see what happens.

View solution in original post

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.