The javadoc says it should go before ContextLoaderListener, which is org.openmrs.web.Listener in OpenMRS. Please move it up.