Package com.salesforce.dataloader.exception

Examples of com.salesforce.dataloader.exception.LoadException


            BeanUtils.copyProperties(sforceObj, sforceDataRow);
            return sforceObj;
        } catch (IllegalAccessException e1) {

            logger.error(Messages.getString("Visitor.dynaBeanError"), e1); //$NON-NLS-1$
            throw new LoadException(e1);
        } catch (InstantiationException e1) {
            logger.fatal(Messages.getString("Visitor.dynaBeanError"), e1); //$NON-NLS-1$
            throw new LoadException(e1);
        } catch (InvocationTargetException e) {
            logger.error(Messages.getString("Visitor.invocationError"), e); //$NON-NLS-1$
            throw new LoadException(e);
        }
    }
View Full Code Here


        headers.add(Config.STATUS_COLUMN_NAME);
        try {
            getSuccessWriter().open();
            getSuccessWriter().setColumnNames(headers);
        } catch (final DataAccessObjectInitializationException e) {
            throw new LoadException(
                    getMessage("errorOpeningSuccessFile", getConfig().getString(Config.OUTPUT_SUCCESS)), e);
        }
    }
View Full Code Here

                col = fieldValue.toString();
            } else if (fieldValue instanceof Calendar) {
                col = DATE_FMT.format(((Calendar) fieldValue).getTime());
            } else if (fieldValue instanceof byte[]) {
                if (!getController().attachmentsEnabled())
                    throw new LoadException(Messages.getMessage("FinishPage", "cannotMapBase64ForBulkApi", fieldName));
                col = this.jobUtil.addAttachment((byte[])fieldValue);
            }
            writeColumnToCsv(out, col);
        } else {
            // all null values should be ignored when using bulk API
View Full Code Here

                getLogger().warn("Cannot find mapping for column: " + userColumn + ".  Omitting column");
                continue;
            }
            // TODO we don't really need to be this strict about a delete CSV file.. as long as the IDS are there
            if (this.isDelete && (!first || !"id".equalsIgnoreCase(sfdcColumn)))
                throw new LoadException(Messages.getMessage(getClass(), "deleteCsvError"));
            addFieldToHeader(out, sfdcColumn, cols, addedCols, first);
            if (first) first = false;
        }
        for (DynaProperty dynaProperty : row.getDynaClass().getDynaProperties()) {
            final String name = dynaProperty.getName();
View Full Code Here

                logger.warn("Failed to close job", e);
            }
            try {
                getResults();
            } catch (AsyncApiException e) {
                throw new LoadException("Failed to get batch results", e);
            }
        }
    }
View Full Code Here

        final List<Row> rows = dataReader.readRowList(clientBatchInfo.numRows);
        if (batch.getState() == BatchStateEnum.Completed || batch.getNumberRecordsProcessed() > 0) {
            try {
                processBatchResults(batch, errorMessage, batch.getState(), rows);
            } catch (IOException e) {
                throw new LoadException("IOException while reading batch results", e);
            }
        } else {
            for (final Row row : rows) {
                writeError(row, errorMessage);
            }
View Full Code Here

        if (state == BatchStateEnum.Failed && (stateMessage == null || stateMessage.length() == 0))
            sanityCheckError(batchId, "Expected error message for failed batch but did not get one");
    }

    private void sanityCheckError(String id, String errMsg) throws LoadException {
        throw new LoadException(id + ": " + errMsg);
    }
View Full Code Here

TOP

Related Classes of com.salesforce.dataloader.exception.LoadException

Copyright © 2018 www.massapicom. 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.