fixing jndi issue in agent config template and apim deployment issue