Skip to content
Create a gist now

Instantly share code, notes, and snippets.

ZooKeeperSaslClient should catch any RuntimeException throwed by getAppConfigurationEntry(..)
diff --git a/src/java/main/org/apache/zookeeper/client/ b/src/java/main/org/apache/zookeeper/client/
index 6087e99..70b8ea1 100644
--- a/src/java/main/org/apache/zookeeper/client/
+++ b/src/java/main/org/apache/zookeeper/client/
@@ -92,10 +92,10 @@ public class ZooKeeperSaslClient {
String clientSection = System.getProperty(ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY, "Client");
// Note that 'Configuration' here refers to
AppConfigurationEntry entries[] = null;
- SecurityException securityException = null;
+ RuntimeException securityException = null;
try {
entries = Configuration.getConfiguration().getAppConfigurationEntry(clientSection);
- } catch (SecurityException e) {
+ } catch (RuntimeException e) {
// handle below: might be harmless if the user doesn't intend to use JAAS authentication.
securityException = e;
@@ -512,7 +512,7 @@ public class ZooKeeperSaslClient {
// scheme, or tunnelled authentication has completed (successfully or
// not), and all server SASL messages have been received.
return false;
- } catch (SecurityException e) {
+ } catch (RuntimeException e) {
// Thrown if the caller does not have permission to retrieve the Configuration.
// In this case, simply returning false is correct.
if (LOG.isDebugEnabled() == true) {

Thanks. I ran in to the same problem when setting up SolrCloud (with independent ZooKeeper) on Weblogic12c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.