A modified patch from BJ "Tenant login can cause a problem when contacting a delegator" (https://issues.apache.org/jira/browse/OFBIZ-3578) - OFBIZ-3578 If the tenantid has leading/trailing spaces