Summary:

A locale error may prevent the successful saving of Date values by the CRM webapps.

Symptoms:

The described issue happened on a German install of Windows server, but was not described in other customer environments.

On starting the CRMJ webapp, the following error was logged to the core.log:

ERROR [http-apr-10009-exec-7]: 07-Feb-2014 16:01:58.861 java.util.MissingResourceException: Can't find bundle for base name org.mozilla.javascript.resources.Messages, locale de_DE
java.util.MissingResourceException: Can't find bundle for base name org.mozilla.javascript.resources.Messages, locale de_DE
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
...
at com.sage.crm.core.data.tls.JavaScriptRunnerCRM.runScript(JavaScriptRunnerCRM.java:250)
at com.sage.crm.core.data.tls.JavaScriptRunnerCRM.runScriptFunction(JavaScriptRunnerCRM.java:216)
at com.sage.crm.core.data.tls.JavaScriptRunnerCRM.runScriptFunction(JavaScriptRunnerCRM.java:211)
at com.sage.crm.core.data.tls.TableLevelScript.execute(TableLevelScript.java:108)
at com.sage.crm.core.dao.UpdateQuery.executeTableLevelScript(UpdateQuery.java:192)
at com.sage.crm.core.dao.UpdateQuery.execute(UpdateQuery.java:101)
at com.sage.crm.gcrm.services.sync.GCRMSyncResultService.updateEntityRecord(GCRMSyncResultService.java:267)
at com.sage.crm.gcrm.services.sync.GCRMSyncResultService.processEntry(GCRMSyncResultService.java:208)
at com.sage.crm.gcrm.services.sync.GCRMSyncResultService.processResultsRequest(GCRMSyncResultService.java:92)
at com.sage.crm.gcrm.endpoint.GCRMSyncResultsEndpoint.processSyncResults(GCRMSyncResultsEndpoint.java:88)
...
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

On executing a table level script as part of the OfficeLine integration, an additional error was logged to the crm.log:

ERROR [http-apr-10009-exec-7]: 07-Feb-2014 16:01:58.873 5. PreparedStatement.setObject(2, V1040)
java.sql.SQLException: Unable to convert between org.mozilla.javascript.NativeString and JAVA_OBJECT.
at net.sourceforge.jtds.jdbc.Support.convert(Support.java:446)
...
at com.sage.crm.core.data.jdbc.BaseJdbc.executeDBQuery(BaseJdbc.java:104)
at com.sage.crm.core.data.jdbc.JdbcUpdate.doUpdate(JdbcUpdate.java:163)
at com.sage.crm.core.data.jdbc.JdbcUpdate.execute(JdbcUpdate.java:84)
at com.sage.crm.core.dao.UpdateQuery.execute(UpdateQuery.java:106)
at com.sage.crm.gcrm.services.sync.GCRMSyncResultService.updateEntityRecord(GCRMSyncResultService.java:267)
at com.sage.crm.gcrm.services.sync.GCRMSyncResultService.processEntry(GCRMSyncResultService.java:208)
at com.sage.crm.gcrm.services.sync.GCRMSyncResultService.processResultsRequest(GCRMSyncResultService.java:92)
at com.sage.crm.gcrm.endpoint.GCRMSyncResultsEndpoint.processSyncResults(GCRMSyncResultsEndpoint.java:88)
...
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The integration synch process failed at this point.

Cause:

The issue is caused by an inability for the CRMJ webapp to load appropriate regional and language options for the de_DE locale. The issue may occur for other languages and locales. The webapp then reverted to defaults localisation settings, resulting in an incorrect date format when a date column was updated on the database.

Resolution:

The issue can be resolved by adding a mapping to the existing DE language for the de_DE locale. This can be done in \CRM\tomcat\webapps\crmj\WEB-INF\languageMapping.properties.

# language mappings
en-gb=UK
en-us=US
en=US
fr=FR
es=ES
de=DE
zh=CS
de_DE=DE

There should be no need to revert these changes to the languageMapping.properties when the issue is fixed in a forthcoming release, as it is expected that the locale mapping used is correct.

Status:

This issue has been escalated to the Development team, and will be resolved in a forthcoming patch.