com.ibm.commerce.foundation.dataload.exception

Class DataLoadSQLException

  • All Implemented Interfaces:
    java.io.Serializable


    public class DataLoadSQLException
    extends DataLoadException

    This class defines the exceptions thrown by the data load when SQL related errors occur during the processing of business object data. A DataLoadSQLException will not terminate the program execution until the error tolerance level is reached. When a DataLoadSQLException is thrown, it will be treated as 1 error encountered in the load process.

    There are several places the DataLoadSQLException will be thrown:

    1. The SQLException is thrown in the JDBCDataWriter. This happens when the JDBC batch update is disabled and the insert, update or delete SQL statements are executed directly.
    2. The SQLException is thrown in the business object mediator. This happens when it calls the ID resolver to resolve ID or check ID.
    3. The SQLException is thrown in the business object loader. This happens when the JDBC batch is enabled and when it reaches the batch size; it calls the table batcher to flush the SQL batch statements. This can also happen when it calls the database commit.

    When the DataLoadSQLException is thrown the data loader will catch it and will roll back all of the uncommitted transactions and prints the error message. If the error count reaches to the error tolerance level a summary report will be printed and the next record will be processed.

    See Also:
    Serialized Form
    • Constructor Detail

      • DataLoadSQLException

        public DataLoadSQLException()
        This is the default constructor for this class,calls super class constructor.
      • DataLoadSQLException

        public DataLoadSQLException(java.lang.String message)
        This is a constructor for this class which has one parameter.
        Parameters:
        message - An DataLoadMessageKeys object used for describing the exception.
      • DataLoadSQLException

        public DataLoadSQLException(java.lang.String message,
                                    java.lang.String className,
                                    java.lang.String methodName)
        This is a constructor for this class which has three parameters.
        Parameters:
        message - An DataLoadMessageKeys object used for describing the exception.
        className - The name of the class that threw this DataLoadSQLException.
        methodName - The name of the method that threw this DataLoadSQLException.
      • DataLoadSQLException

        public DataLoadSQLException(java.lang.String message,
                                    java.lang.String className,
                                    java.lang.String methodName,
                                    java.sql.SQLException ex)
        This is a constructor for this class which has four parameters.
        Parameters:
        message - An DataLoadMessageKeys object used for describing the exception.
        className - The name of the class that threw this DataLoadSQLException.
        methodName - The name of the method that threw this DataLoadSQLException.
        ex - The SQL exception causing at the original point of failure.
      • DataLoadSQLException

        public DataLoadSQLException(java.lang.String message,
                                    java.lang.Object[] param,
                                    java.lang.String className,
                                    java.lang.String methodName)
        This is a constructor for this class which has four parameters.
        Parameters:
        message - An DataLoadMessageKeys object used for describing the exception.
        param - An Object array of parameter values to be passed to the message.
        className - The name of the class that threw this DataLoadSQLException.
        methodName - The name of the method that threw this DataLoadSQLException.
      • DataLoadSQLException

        public DataLoadSQLException(java.lang.String message,
                                    java.lang.Object[] param,
                                    java.lang.String className,
                                    java.lang.String methodName,
                                    java.lang.Throwable cause)
        This is a constructor for this class which has five parameters.
        Parameters:
        message - An DataLoadMessageKeys object used for describing the exception.
        param - An Object array of parameter values to be passed to the message.
        className - The name of the class that threw this DataLoadSQLException.
        methodName - The name of the method that threw this DataLoadSQLException.
        cause - The exception causing at the original point of failure.
    • Method Detail

      • getSQLException

        public java.sql.SQLException getSQLException()
        Gets the SQL exception.
        Returns:
        the SQL exception.