OpenMRS war file exceeding 50MBs configured for tomcat

OpenMRS Platform 1.11 platform war file is currently 54.3 MBs at which size exceeds the 50MBs that are by default set as the maximum war file size that is allowed, therefore uploading the war file into tomcat may have showed some error that looks like:

 java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (55680341) exceeds the configured maximum (52428800)

To clear this up:

  1. Go to the web.xml (for instance it could be under …/tomcat7/webapps/manager/WEB-INF/web.xml. and open that file an a text editor
  2. Then modify the size to at-least above the file of the openmrs.war file like:

Best wishes as you use our platform

1 Like