December 22, 2024

Alfresco tips and tricks – #9 GetModelsDiff return status is 500

In Alfresco 4.0 there is a known bug related to a truncation in the HTTP request body from SOLR to Alfresco. ModelsGet from SOLR truncates JSON to 4096 characters. Here is a log excerpt.

ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 02290002 Invalid JSON
org.springframework.extensions.webscripts.WebScriptException: 02290002 Invalid JSON
[...]
Caused by: org.json.JSONException: Unterminated string at character 4096
[...]
SEVERE: Job (Solr.CoreTracker-archive threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. 
[See nested exception: org.alfresco.error.AlfrescoRuntimeException:
 02290000 GetModelsDiff return status is 500]
at org.quartz.core.JobRunShell.run(JobRunShell.java:227)

To solve this issue  you can disable the POST buffer limit in the Tomcat SSL connector definition. Edit the {TOMCAT_HOME}/conf/server.xml and set maxSavePostSize=-1 as shown below.

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" 
SSLEnabled="true" maxThreads="150" scheme="https" 
keystoreFile="D:/alfresco/solr/solr_data/keystore/ssl.keystore" 
keystorePass="XXXXXXX" keystoreType="JCEKS" secure="true"
connectionTimeout="240000" 
truststoreFile="D:/alfresco/solr/solr_data/keystore/ssl.truststore" 
truststorePass="XXXXXXX" truststoreType="JCEKS"
 clientAuth="false" sslProtocol="TLS" maxSavePostSize="-1" />

Leave a Reply

Your email address will not be published.