Download file: Fix for Exchange sync failing daily after midnight: Sage CRM 2021 R2 and above
This fix is for Sage CRM 2021 R2 and above.
In instances of Sage CRM integrated with Microsoft Exchange, customers may experience an issue where Exchange sync fails every day after midnight.
An example log entry for the exchange failure is below:
ERROR [http-nio-10001-exec-3]: DD-MON-YYYY HH:MM:SS java.nio.file.InvalidPathException: Illegal char < > at index 127: C:\Program Files (x86)\Sage\CRM\.....\Logs\Exchange Integration\User\....\'admin_syncActivityExchangeToCRM- .log
The issue is caused by the file pattern defined in log4j2.xml. This error did not allow CRM to create a new log file daily.
The following are workarounds.
Workaround 1: Restarting Tomcat Daily.
Restarting Tomcat daily can resolve this issue. It will allow CRM to generate a new daily log. You can schedule the restart process daily by following the below post.
Workaround 2: Changing pattern in Log4j2.xml file.
Restarting Tomcat daily is not feasible for all clients.
The other solution is to change the pattern of syncActivityExchangeToCRM.log in the log4j2.xml file.
You can use the below attached log4j2.xml file and replace it with the old one in
<CRM INSTALL>\tomcat\webapps\<install_name>j\WEB-INF\classes.
These workarounds will help you to resolve the issue.
This article applies to Sage CRM stand-alone and when integrated with Sage accounting products. Sage 50, Sage 100, Sage 200, Sage 300, Sage X3 and Sage Intacct.