Package java.security

Examples of java.security.AccessControlException.initCause()


        try {
            Policy.getPolicy().refresh();
        } catch (SecurityException e) {
           AccessControlException ace = new AccessControlException(e.toString());
           ace.initCause(e);
           throw ace;
        }
    }

   /**
 
View Full Code Here


                                 PermissionFactory.CONN_RESOURCE_PREFIX+
                                 serviceType, (String)null, (Map)null);
       } catch (Exception e) {
           logger.logStack(Logger.ERROR, e.toString(), e);
           AccessControlException ace = new AccessControlException(e.toString());
           ace.initCause(e);
           throw ace;
       }
       try {
           checkPermission(subject, perm);
       } catch (AccessControlException e) {
View Full Code Here

       try {
           checkPermission(subject, perm);
       } catch (AccessControlException e) {
           AccessControlException ace = new AccessControlException(e.getMessage()+": "+
                    clientUser+" ["+subject.getPrincipals()+"]");
           ace.initCause(e);
           throw ace;
       }
    }

   /**
 
View Full Code Here

                                 operation, (Map)null);
           }
       } catch (Exception e) {
           logger.logStack(Logger.ERROR, e.toString(), e);
           AccessControlException ace = new AccessControlException(e.toString());
           ace.initCause(e);
           throw ace;
       }
       try {
           checkPermission(subject, perm);
       } catch (AccessControlException e) {
View Full Code Here

       try {
           checkPermission(subject, perm);
       } catch (AccessControlException e) {
           AccessControlException ace = new AccessControlException(e.getMessage()+": "+
                    clientUser+" ["+subject.getPrincipals()+"]");
           ace.initCause(e);
           throw ace;
       }
    }

    private void checkPermission(Subject subject, Permission p)
View Full Code Here

       return list;

       } catch (Exception e) {
         AccessControlException ae = new AccessControlException(
                      e.toString()+(currentkey == null ? "":" - "+currentkey));
         ae.initCause(e);
         throw ae;
       }
    }

    private HashMap getRuleRightHand(String propname) {
View Full Code Here

  }

  private static AccessControlException accessControlException(
      org.apache.hadoop.fs.permission.AccessControlException e) {
    AccessControlException ace = new AccessControlException(e.getMessage());
    ace.initCause(e);
    return ace;
  }

}
View Full Code Here

  }

  private static AccessControlException accessControlException(
      org.apache.hadoop.fs.permission.AccessControlException e) {
    AccessControlException ace = new AccessControlException(e.getMessage());
    ace.initCause(e);
    return ace;
  }

  @Override
  public void authorizeAuthorizationApiInvocation() throws HiveException, AuthorizationException {
View Full Code Here

    Throwable curErr = err;
    for (int idx = 0; curErr != null && idx < maxDepth; ++idx) {
      if (curErr instanceof org.apache.hadoop.security.AccessControlException
          || curErr instanceof org.apache.hadoop.fs.permission.AccessControlException) {
        Exception newErr = new AccessControlException(curErr.getMessage());
        newErr.initCause(err);
        return newErr;
      }
      curErr = curErr.getCause();
    }
    return err;
View Full Code Here

  }

  private static AccessControlException accessControlException(
      org.apache.hadoop.fs.permission.AccessControlException e) {
    AccessControlException ace = new AccessControlException(e.getMessage());
    ace.initCause(e);
    return ace;
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.