MODE-1966 Updated exception handling for readonly-jndi contexts