⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 errorcode.java

📁 非常棒的java数据库
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
    /**
     * The error with code <code>90016</code> is thrown when
     * a column was used in the expression list or the order by clause
     * of a group or aggregate query, and that column is not in the GROUP BY clause.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT, NAME VARCHAR);
     * INSERT INTO TEST VALUES(1, 'Hello'), (2, 'World');
     * SELECT ID, MAX(NAME) FROM TEST;
     * Column ID must be in the GROUP BY list.
     * </pre>
     * Correct:
     * <pre>
     * SELECT ID, MAX(NAME) FROM TEST GROUP BY ID;
     * </pre>
     */
    public static final int MUST_GROUP_BY_COLUMN_1 = 90016;

    /**
     * The error with code <code>90017</code> is thrown when
     * trying to define a second primary key constraint for this table.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR);
     * ALTER TABLE TEST ADD CONSTRAINT PK PRIMARY KEY(NAME);
     * </pre>
     */
    public static final int SECOND_PRIMARY_KEY = 90017;

    /**
     * The error with code <code>90018</code> is thrown when
     * the connection was opened, but never closed. In the finalizer of the
     * connection, this forgotten close was detected and the connection was
     * closed automatically, but relying on the finalizer is not good practice
     * as it is not guaranteed and behavior is virtual machine dependent. The
     * application should close the connection. This exception only appears in
     * the .trace.db file. Example:
     * <pre>
     * Connection conn;
     * conn = DriverManager.getConnection(&quot;jdbc:h2:&tilde;/test&quot;);
     * conn = null;
     * The connection was not closed by the application and is 
     * garbage collected
     * </pre>
     * Correct:
     * <pre>
     * conn.close();
     * </pre>
     */
    public static final int TRACE_CONNECTION_NOT_CLOSED = 90018;

    /**
     * The error with code <code>90019</code> is thrown when
     * trying to drop the current user.
     * Example:
     * <pre>
     * DROP USER SA;
     * </pre>
     */
    public static final int CANNOT_DROP_CURRENT_USER = 90019;

    /**
     * The error with code <code>90020</code> is thrown when trying to open a
     * database in embedded mode if this database is already in use in another
     * process (or in a different class loader). Multiple connections to the
     * same database are supported in the following cases:
     * <ul><li>In embedded mode (URL of the form jdbc:h2:~/test) if all 
     * connections are opened within the same process and class loader. 
     * </li><li>In server and cluster mode (URL of the form
     * jdbc:h2:tcp://localhost/test) using remote connections. 
     * </li></ul>
     * The mixed mode is also supported. This mode requires to start a server 
     * in the same process where the database is open in embedded mode.
     */
    public static final int DATABASE_ALREADY_OPEN_1 = 90020;

    /**
     * The error with code <code>90021</code> is thrown when
     * trying to convert a value to a data type where the conversion is undefined,
     * or when an error occured trying to convert.
     * Example:
     * <pre>
     * CALL CAST(DATE '2001-01-01' AS BOOLEAN);
     * CALL CAST('CHF 99.95' AS INT);
     * </pre>
     */
    public static final int DATA_CONVERSION_ERROR_1 = 90021;

    /**
     * The error with code <code>90022</code> is thrown when
     * trying to call a unknown function.
     * Example:
     * <pre>
     * CALL SPECIAL_SIN(10);
     * </pre>
     */
    public static final int FUNCTION_NOT_FOUND_1 = 90022;

    /**
     * The error with code <code>90023</code> is thrown when
     * trying to set a primary key on a nullable column.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT, NAME VARCHAR);
     * ALTER TABLE TEST ADD CONSTRAINT PK PRIMARY KEY(ID);
     * </pre>
     */
    public static final int COLUMN_MUST_NOT_BE_NULLABLE_1 = 90023;

    /**
     * The error with code <code>90024</code> is thrown when
     * a file could not be renamed.
     */
    public static final int FILE_RENAME_FAILED_2 = 90024;

    /**
     * The error with code <code>90025</code> is thrown when
     * a file could not be deleted, because it is still in use
     * (only in Windows), or because an error occured when deleting.
     */
    public static final int FILE_DELETE_FAILED_1 = 90025;

    /**
     * The error with code <code>90026</code> is thrown when
     * an object could not be serialized.
     */
    public static final int SERIALIZATION_FAILED_1 = 90026;

    /**
     * The error with code <code>90027</code> is thrown when
     * an object could not be de-serialized.
     */
    public static final int DESERIALIZATION_FAILED_1 = 90027;

    /**
     * The error with code <code>90028</code> is thrown when
     * an input / output error occured. For more information, see the root
     * cause of the exception.
     */
    public static final int IO_EXCEPTION_1 = 90028;

    /**
     * The error with code <code>90029</code> is thrown when
     * calling ResultSet.deleteRow(), insertRow(), or updateRow()
     * when the current row is not updatable.
     * Example:
     * <pre>
     * ResultSet rs = stat.executeQuery("SELECT * FROM TEST");
     * rs.next();
     * rs.insertRow();
     * </pre>
     */
    public static final int NOT_ON_UPDATABLE_ROW = 90029;

    /**
     * The error with code <code>90030</code> is thrown when
     * the database engine has detected a checksum mismatch in the data
     * or index. To solve this problem, restore a backup or use the
     * Recovery tool (org.h2.tools.Recover).
     */
    public static final int FILE_CORRUPTED_1 = 90030;

    /**
     * The error with code <code>90031</code> is thrown when
     * an input / output error occured. For more information, see the root
     * cause of the exception.
     */
    public static final int IO_EXCEPTION_2 = 90031;

    /**
     * The error with code <code>90032</code> is thrown when
     * trying to drop or alter a user that does not exist.
     * Example:
     * <pre>
     * DROP USER TEST_USER;
     * </pre>
     */
    public static final int USER_NOT_FOUND_1 = 90032;

    /**
     * The error with code <code>90033</code> is thrown when
     * trying to create a user or role if a user with this name already exists.
     * Example:
     * <pre>
     * CREATE USER TEST_USER;
     * CREATE USER TEST_USER;
     * </pre>
     */
    public static final int USER_ALREADY_EXISTS_1 = 90033;

    /**
     * The error with code <code>90034</code> is thrown when
     * writing to the trace file failed, for example because the there
     * is an I/O exception. This message is printed to System.out,
     * but only once.
     */
    public static final int TRACE_FILE_ERROR_2 = 90034;

    /**
     * The error with code <code>90035</code> is thrown when
     * trying to create a sequence if a sequence with this name already
     * exists.
     * Example:
     * <pre>
     * CREATE SEQUENCE TEST_SEQ;
     * CREATE SEQUENCE TEST_SEQ;
     * </pre>
     */
    public static final int SEQUENCE_ALREADY_EXISTS_1 = 90035;

    /**
     * The error with code <code>90036</code> is thrown when
     * trying to access a sequence that does not exist.
     * Example:
     * <pre>
     * SELECT NEXT VALUE FOR SEQUENCE XYZ;
     * </pre>
     */
    public static final int SEQUENCE_NOT_FOUND_1 = 90036;

    /**
     * The error with code <code>90037</code> is thrown when
     * trying to drop or alter a view that does not exist.
     * Example:
     * <pre>
     * DROP VIEW XYZ;
     * </pre>
     */
    public static final int VIEW_NOT_FOUND_1 = 90037;

    /**
     * The error with code <code>90038</code> is thrown when
     * trying to create a view if a view with this name already
     * exists.
     * Example:
     * <pre>
     * CREATE VIEW DUMMY AS SELECT * FROM DUAL;
     * CREATE VIEW DUMMY AS SELECT * FROM DUAL;
     * </pre>
     */
    public static final int VIEW_ALREADY_EXISTS_1 = 90038;

    /**
     * The error with code <code>90039</code> is thrown when
     * trying to convert a decimal value to lower precision if the
     * value is out of range for this precision.
     * Example:
     * <pre>
     * SELECT * FROM TABLE(X DECIMAL(2, 2) = (123.34));
     * </pre>
     */
    public static final int VALUE_TOO_LARGE_FOR_PRECISION_1 = 90039;

    /**
     * The error with code <code>90040</code> is thrown when
     * a user that is not administrator tries to execute a statement
     * that requires admin privileges.
     */
    public static final int ADMIN_RIGHTS_REQUIRED = 90040;

    /**
     * The error with code <code>90041</code> is thrown when
     * trying to create a trigger and there is already a trigger with that name.
     * <pre>
     * CREATE TABLE TEST(ID INT);
     * CREATE TRIGGER TRIGGER_A AFTER INSERT ON TEST
     *      CALL "org.h2.samples.TriggerSample$MyTrigger";
     * CREATE TRIGGER TRIGGER_A AFTER INSERT ON TEST
     *      CALL "org.h2.samples.TriggerSample$MyTrigger";
     * </pre>
     */
    public static final int TRIGGER_ALREADY_EXISTS_1 = 90041;

    /**
     * The error with code <code>90042</code> is thrown when
     * trying to drop a trigger that does not exist.
     * Example:
     * <pre>
     * DROP TRIGGER TRIGGER_XYZ;
     * </pre>
     */
    public static final int TRIGGER_NOT_FOUND_1 = 90042;

    /**
     * The error with code <code>90043</code> is thrown when
     * there is an error initializing the trigger, for example because the
     * class does not implement the Trigger interface.
     * See the root cause for details.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT);
     * CREATE TRIGGER TRIGGER_A AFTER INSERT ON TEST
     *      CALL "java.lang.String";
     * </pre>
     */
    public static final int ERROR_CREATING_TRIGGER_OBJECT_3 = 90043;

    /**
     * The error with code <code>90044</code> is thrown when
     * an exception or error occured while calling the triggers fire method.
     * See the root cause for details.
     */
    public static final int ERROR_EXECUTING_TRIGGER_3 = 90044;

    /**
     * The error with code <code>90045</code> is thrown when
     * trying to create a constraint  if an object with this name already exists.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT NOT NULL);
     * ALTER TABLE TEST ADD CONSTRAINT PK PRIMARY KEY(ID);
     * ALTER TABLE TEST ADD CONSTRAINT PK PRIMARY KEY(ID);
     * </pre>
     */
    public static final int CONSTRAINT_ALREADY_EXISTS_1 = 90045;

    /**
     * The error with code <code>90046</code> is thrown when
     * trying to open a connection to a database using an unsupported URL format.
     * Please see the documentation on the supported URL format and examples.
     * Example:
     * <pre>
     * jdbc:h2:;;
     * </pre>
     */
    public static final int URL_FORMAT_ERROR_2 = 90046;

    /**
     * The error with code <code>90047</code> is thrown when
     * trying to connect to a TCP server with an incompatible client.
     */
    public static final int DRIVER_VERSION_ERROR_2 = 90047;

    /**
     * The error with code <code>90048</code> is thrown when
     * the file header of a database files (*.db) does not match the
     * expected version, or if it is corrupted.
     */
    public static final int FILE_VERSION_ERROR_1 = 90048;

    /**
     * The error with code <code>90049</code> is thrown when
     * trying to open an encrypted database with the wrong file encryption
     * password or algorithm.
     */
    public static final int FILE_ENCRYPTION_ERROR_1 = 90049;

    /**
     * The error with code <code>90050</code> is thrown when trying to open an
     * encrypted database, but not separating the file password from the user
     * password. The file password is specified in the password field, before
     * the user password. A single space needs to be added between the file
     * password and the user password; the file password itself may not contain
     * spaces. File passwords (as well as user passwords) are case sensitive.
     * Example:
     * <pre>
     * String url = &quot;jdbc:h2:&tilde;/test;CIPHER=AES&quot;;
     * String passwords = &quot;filePasswordUserPassword&quot;;
     * DriverManager.getConnection(url, &quot;sa&quot;, pwds);
     * </pre>
     * Correct:
     * <pre>
     * String url = &quot;jdbc:h2:&tilde;/test;CIPHER=AES&quot;;
     * String passwords = &quot;filePassword userPassword&quot;;
     * DriverManager.getConnection(url, &quot;sa&quot;, pwds);
     * </pre>
     */
    public static final int WRONG_PASSWORD_FORMAT = 90050;

    /**
     * The error with code <code>90051</code> is thrown when
     * a statement was cancelled using Statement.cancel() or
     * when the query timeout has been reached.
     * Examples:
     * <pre>
     * stat.setQueryTimeout(1);
     * stat.cancel();
     * </pre>
     */
    public static final int STATEMENT_WAS_CANCELLED = 90051;

    /**
     * The error with code <code>90052</code> is thrown when
     * a subquery that is used as a value contains more than one column.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT);
     * INSERT INTO TEST VALUES(1), (2);
     * SELECT * FROM TEST WHERE ID IN (SELECT 1, 2 FROM DUAL);
     * </pre>
     * Correct:
     * <pre>
     * CREATE TABLE TEST(ID INT);
     * INSERT INTO TEST VALUES(1), (2);
     * SELECT * FROM TEST WHERE ID IN (1, 2);
     * </pre>
     */
    public static final int SUBQUERY_IS_NOT_SINGLE_COLUMN = 90052;

    /**
     * The error with code <code>90053</code> is thrown when
     * a subquery that is used as a value contains more than one row.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT, NAME VARCHAR);
     * INSERT INTO TEST VALUES(1, 'Hello'), (1, 'World');
     * SELECT X, (SELECT NAME FROM TEST WHERE ID=X) FROM DUAL;
     * </pre>
     */
    public static final int SCALAR_SUBQUERY_CONTAINS_MORE_THAN_ONE_ROW = 90053;

    /**
     * The error with code <code>90054</code> is thrown when
     * an aggregate function is used where it is not allowed.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT);
     * INSERT INTO TEST VALUES(1), (2);
     * SELECT MAX(ID) FROM TEST WHERE ID = MAX(ID) GROUP BY ID;
     * </pre>
     */
    public static final int INVALID_USE_OF_AGGREGATE_FUNCTION_1 = 90054;

    /**
     * The error with code <code>90055</code> is thrown when
     * trying to open a database with an unsupported cipher algorithm.
     * Supported are AES and XTEA.
     * Example:
     * <pre>
     * jdbc:h2:~/test;CIPHER=DES
     * </pre>
     */
    public static final int UNSUPPORTED_CIPHER = 90055;

    /**
     * The error with code <code>90056</code> is thrown when
     * updating or deleting from a table with a foreign key constraint
     * that should set the default value, but there is no default value defined.
     * Example:
     * <pre>
     * CREATE TABLE TEST(ID INT, PARENT INT);
     * INSERT INTO TEST VALUES(1, 1), (2, 1);
     * ALTER TABLE TEST ADD CONSTRAINT TEST_ID_PARENT
     *   FOREIGN KEY(PARENT) REFERENCES(ID) ON DELETE SET DEFAULT;
     *   DELETE FROM TEST WHERE ID=1;
     * </pre>
     */
    public static final int NO_DEFAULT_SET_1 = 90056;

    /**
     * The error with code <code>90057</code> is thrown when
     * trying to drop a constraint that does not exist.
     * Example:
     * <pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -