2016-04-22 33 views
1

私はDerby DBを使用しています。私はデータベースをシャットダウンしようとしています。私が受けています:derby dbのエラーコードの一覧はどこですか?

----- SQLException ----- 
SQL State: XJ004 
Error Code: 40000 
Message: Database '<db name>' not found. 

私はここに記載されているSQL状態を見つけることができる:http://db.apache.org/derby/docs/10.8/ref/rrefexcept71493.html

それはしかしXJ004: Database '<databaseName>' not found.

を示しています、私はダービーのためのエラーコードのリストを見つけることができません。

エラーコードの一覧はどこですか?

答えて

1

DerbyはSQLException内のエラー・コードを使用して、例外severityを表します。

JDBCドライバは、Derbyからのすべてのエラーに対してSQLExceptionsを返します。 例外がユーザー・タイプから発生したものの、それ自体は SQLExceptionではない場合、SQLExceptionにラップされます。 Derby固有 SQLExceptionsは、Xで始まるSQLStateクラスコードを使用します。標準 SQLState値は、必要に応じて例外に対して返されます。

ダービーデータベースの例外は、重大度別に分類されます。重大度が の場合、SQLExceptionが のgetErrorCodeメソッド呼び出しによってSQLExceptionが使用可能になります。重大度は以下に要約されています。より多くの については、 org.apache.derby.types.ExceptionSeverityのJavadocをチェック:

定数は、次のとおりです。

/** 
* NO_APPLICABLE_SEVERITY occurs only when the system was 
* unable to determine the severity. 
*/ 
public static final int NO_APPLICABLE_SEVERITY = 0; 
/** 
* WARNING_SEVERITY is associated with SQLWarnings. 
*/ 
public static final int WARNING_SEVERITY = 10000; 
/** 
* STATEMENT_SEVERITY is associated with errors which 
* cause only the current statement to be aborted. 
*/ 
public static final int STATEMENT_SEVERITY = 20000; 
/** 
* TRANSACTION_SEVERITY is associated with those errors which 
* cause the current transaction to be aborted. 
*/ 
public static final int TRANSACTION_SEVERITY = 30000; 
/** 
* SESSION_SEVERITY is associated with errors which 
* cause the current connection to be closed. 
*/ 
public static final int SESSION_SEVERITY = 40000; 
/** 
* DATABASE_SEVERITY is associated with errors which 
* cause the current database to be closed. 
*/ 
public static final int DATABASE_SEVERITY = 45000; 
/** 
* SYSTEM_SEVERITY is associated with internal errors which 
* cause the system to shut down. 
*/ 
public static final int SYSTEM_SEVERITY = 50000; 
+0

おかげで、これはエラーコードを説明しています。 –

関連する問題