If the same code works fine in local but not in another environment, then its most likely environment configurations. Check the library versions are same, core components, ACS commons/tools versions, as applicable. Check that your "service user" has appropriate permissions and compare the lib. versi...