Examples of AlreadyExistsException


Examples of org.apache.hadoop.hive.metastore.api.AlreadyExistsException

        } catch (NoSuchObjectException e) {
          // this means there is no existing partition
          old_part = null;
        }
        if (old_part != null) {
          throw new AlreadyExistsException("Partition already exists:" + part);
        }

        if (!wh.isDir(partLocation)) {
          if (!wh.mkdirs(partLocation)) {
            throw new MetaException(partLocation
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.AlreadyExistsException

        } catch (NoSuchObjectException e) {
          // this means there is no existing partition
          old_part = null;
        }
        if (old_part != null) {
          throw new AlreadyExistsException("Partition already exists:" + part);
        }
        tbl = ms.getTable(part.getDbName(), part.getTableName());
        if (tbl == null) {
          throw new InvalidObjectException(
              "Unable to add partition because table or database do not exist");
View Full Code Here

Examples of org.apache.hadoop.io.SecureIOUtils.AlreadyExistsException

            NativeIO.POSIX.O_WRONLY | NativeIO.POSIX.O_CREAT
                | NativeIO.POSIX.O_EXCL, permissions);
        return new FileOutputStream(fd);
      } catch (NativeIOException nioe) {
        if (nioe.getErrno() == Errno.EEXIST) {
          throw new AlreadyExistsException(nioe);
        }
        throw nioe;
      }
    } else {
      // Use the Windows native APIs to create equivalent FileOutputStream
      try {
        FileDescriptor fd = NativeIO.Windows.createFile(f.getCanonicalPath(),
            NativeIO.Windows.GENERIC_WRITE,
            NativeIO.Windows.FILE_SHARE_DELETE
                | NativeIO.Windows.FILE_SHARE_READ
                | NativeIO.Windows.FILE_SHARE_WRITE,
            NativeIO.Windows.CREATE_NEW);
        NativeIO.POSIX.chmod(f.getCanonicalPath(), permissions);
        return new FileOutputStream(fd);
      } catch (NativeIOException nioe) {
        if (nioe.getErrorCode() == 80) {
          // ERROR_FILE_EXISTS
          // 80 (0x50)
          // The file exists
          throw new AlreadyExistsException(nioe);
        }
        throw nioe;
      }
    }
  }
View Full Code Here

Examples of org.codehaus.xfire.aegis.inheritance.ws2.common.exception.AlreadyExistsException

        throws AlreadyExistsException
    {
        String id = parentBean.getId();
        if (m_map.containsKey(id))
        {
            throw new AlreadyExistsException(id);
        }
        m_map.put(id, parentBean);
    }
View Full Code Here

Examples of org.glite.authz.pap.repository.exceptions.AlreadyExistsException

        String policyId = policyTypeString.getPolicyId();

        File policyFile = new File(getPolicyFileAbsolutePath(papId, policyId));

        if (policyFile.exists()) {
            throw new AlreadyExistsException("Already exists: policyId=" + policyId);
        }

        PolicyHelper.toFile(policyFile, policyTypeString);

        getPapCache(papId).put(policyId, policyTypeString);
View Full Code Here

Examples of org.jboss.jca.core.spi.mdr.AlreadyExistsException

         throw new IllegalArgumentException("Connector is null");

      // The IronJacamar metadata object can be null

      if (raTemplates.containsKey(uniqueId))
         throw new AlreadyExistsException(bundle.keyNotRegistered(uniqueId));

      raTemplates.put(uniqueId, md);
      raRoots.put(uniqueId, root);
      ironJacamar.put(uniqueId, ijmd);
   }
View Full Code Here

Examples of org.jivesoftware.util.AlreadyExistsException

    }

    public Element createVCard(String username, Element vCardElement) throws AlreadyExistsException {
        if (loadVCard(username) != null) {
            // The user already has a vCard
            throw new AlreadyExistsException("Username " + username + " already has a vCard");
        }

        Connection con = null;
        PreparedStatement pstmt = null;
        try {
View Full Code Here

Examples of org.jivesoftware.util.AlreadyExistsException

     * @param isHidden True if the service is hidden from view in services lists.
     * @return MultiUserChatService implementation that was just created.
     * @throws AlreadyExistsException if the service already exists.
     */
    public MultiUserChatServiceImpl createMultiUserChatService(String subdomain, String description, Boolean isHidden) throws AlreadyExistsException {
        if (getMultiUserChatServiceID(subdomain) != null) throw new AlreadyExistsException();
        MultiUserChatServiceImpl muc = new MultiUserChatServiceImpl(subdomain, description, isHidden);
        insertService(subdomain, description, isHidden);
        registerMultiUserChatService(muc);
        return muc;
    }
View Full Code Here

Examples of org.pentaho.platform.api.engine.security.userroledao.AlreadyExistsException

          return createRole( session, tenant, roleName, description, memberUserNames );
        }
      } );
    } catch ( DataAccessException e ) {
      if ( ( e instanceof JcrSystemException ) && ( e.getCause() instanceof AuthorizableExistsException ) ) {
        throw new AlreadyExistsException( "" );
      }
      throw new UncategorizedUserRoleDaoException( Messages.getInstance().getString(
          "JcrUserRoleDao.ERROR_0002_CREATING_ROLE", e.getLocalizedMessage() ), e );
    }
  }
View Full Code Here

Examples of org.springframework.security.acls.model.AlreadyExistsException

    public MutableAcl createAcl(ObjectIdentity objectIdentity) throws AlreadyExistsException {
        Assert.notNull(objectIdentity, "Object Identity required");

        // Check this object identity hasn't already been persisted
        if (retrieveObjectIdentityPrimaryKey(objectIdentity) != null) {
            throw new AlreadyExistsException("Object identity '" + objectIdentity + "' already exists");
        }

        // Need to retrieve the current principal, in order to know who "owns" this ACL (can be changed later on)
        Authentication auth = SecurityContextHolder.getContext().getAuthentication();
        PrincipalSid sid = new PrincipalSid(auth);
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.