function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KT@CiscoKT@Cisco 

Email To Case throws java.lang.IllegalStateException for certain characters in email.

Hello!

 

I am using Sforce Email to Case Version 1.06.
 

I have Email2Case agent downloading emails (most of them in Japanese) having unicode characters as well as some special characters.

 

Often times, the Email2Case agent chokes on one or more emails having such special characters. One of the characters it chokes upon is a square bracket (and there are some more such characters). Once the Email2Case agent chokes on such an email, it is unable to proceed further with other messages in the POP/IMAP account until the agent is restarted at which point, it processes other emails but still chokes on the problematic email.

 

Question-1

========

I want to know if others have faced such an issue with the Email2Case agent and if so, how did you remedy the situation? 

 

Question-2

========

Is there a patch/update available for the Email2Case agent where such a situation has already been addressed?

 

Here's a snapshot of the exception that gets thrown by Email2Case whenever it encounters a special character and following this exception, it starts to choke (effectively not downloading anything until this problem email is deleted from the mailbox).

 

2009-12-15 18:46:42,556 182765 [Timer-0] ERROR com.sforce.mail.GenericClient  - java.lang.IllegalStateException: character 22 is not allowed in output (text value='[TS Routing Request Tool - Req ID:5851]  Add New subtechnology : RF Gateway 1 \u0016 Edge QAMs (xDQA series) - Modulators - Updated')
java.lang.IllegalStateException: character 22 is not allowed in output (text value='[TS Routing Request Tool - Req ID:5851]  Add New subtechnology : RF Gateway 1 \u0016 Edge QAMs (xDQA series) - Modulators - Updated')
    at com.sforce.ws.parser.MXSerializer.writeElementContent(MXSerializer.java:954)
    at com.sforce.ws.parser.MXSerializer.text(MXSerializer.java:778)
    at com.sforce.ws.parser.XmlOutputStream.writeText(XmlOutputStream.java:80)
    at com.sforce.ws.bind.TypeMapper.writeString(TypeMapper.java:195)
    at com.sforce.soap.partner.wsc80.NameValuePair.writeFields(NameValuePair.java:75)
    at com.sforce.soap.partner.wsc80.NameValuePair.write(NameValuePair.java:67)
    at com.sforce.ws.bind.TypeMapper.writeSingleObject(TypeMapper.java:251)
    at com.sforce.ws.bind.TypeMapper.writeArrayObject(TypeMapper.java:244)
    at com.sforce.ws.bind.TypeMapper.writeObject(TypeMapper.java:235)
    at com.sforce.soap.partner.wsc80.HandledEmailMessage.writeFields(HandledEmailMessage.java:141)
    at com.sforce.soap.partner.wsc80.HandledEmailMessage.write(HandledEmailMessage.java:133)
    at com.sforce.ws.bind.TypeMapper.writeSingleObject(TypeMapper.java:251)
    at com.sforce.ws.bind.TypeMapper.writeArrayObject(TypeMapper.java:244)
    at com.sforce.ws.bind.TypeMapper.writeObject(TypeMapper.java:235)
    at com.sforce.soap.partner.wsc80.HandleEmailMessage_element.writeFields(HandleEmailMessage_element.java:52)
    at com.sforce.soap.partner.wsc80.HandleEmailMessage_element.write(HandleEmailMessage_element.java:45)
    at com.sforce.ws.transport.SoapConnection.writeBody(SoapConnection.java:256)
    at com.sforce.ws.transport.SoapConnection.sendRequest(SoapConnection.java:226)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:73)
    at com.sforce.soap.partner.wsc80.PartnerConnection.handleEmailMessage(PartnerConnection.java:374)
    at com.sforce.mail.GenericClient.handleMessage(GenericClient.java:598)
    at com.sforce.mail.GenericClient.receive(GenericClient.java:409)
    at com.sforce.mail.EmailService$EmailWorker.run(EmailService.java:211)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)
 

Thanks in advance.

 

Message Edited by KT@Cisco on 12-23-2009 08:03 AM
Best Answer chosen by Admin (Salesforce Developers) 
KT@CiscoKT@Cisco

Just found from Salesforce.com support that this issue has been resolved in version 1.08 and that SFDC is recommending the use of On-demand Email2Case instead of the Email2Case client based solution.

 

Thought of posting it here for others who might be facing this issue.