Retain Error: String index out of range: -1

  • 7022061
  • 11-Oct-2017
  • 11-Oct-2017


Retain 4.2


When running an archive job, we are getting errors on just a few users out of an entire post office that continue to get an error "java.lang.StringIndexOutOfBoundsException: String index out of range: -1" and it kills the archive job. When the job dies, it dies immediately on the Retain server side but the worker continues to run unable to get info until its speeds drop down to almost nothing and eventually after about 10 minutes times out and quits.


A patch needs to be installed to properly handle this error.

1. Make a backup of your retain-system including the database.
2. Make a backup of the existing files beneath your Retain installation path:
3. Check the userrights and filemodes from the current files.
4. Check the filemodes of both files.
> stat --format '%a' JobStatusTracker.class
> stat --format '%a' JobStatusTracker$1.class
5. Check the file ownership of both files.
> ls -l JobStatusTracker.class
> ls -l JobStatusTracker$1.class
6. Shutdown your retain service and tomcat.
> rcretain-tomcat8 stop
> service retain-tomcat8 stop
7. Copy the new files to the directories.
8. Make sure that the userrights and filemodes are correct. Use chown&chmod commands to change if necessary.
9. Restart the retain server.

The retain archiving jobs should now proceed as usual.


An attachment is missing from some of the emails, generating the error.