You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by da...@apache.org on 2006/04/06 22:14:38 UTC
svn commit: r392060 - in /db/derby/code/trunk/java:
build/org/apache/derbyBuild/ client/org/apache/derby/loc/
engine/org/apache/derby/iapi/error/ engine/org/apache/derby/loc/
shared/org/apache/derby/shared/common/reference/
testing/org/apache/derbyTest...
Author: davidvc
Date: Thu Apr 6 13:14:33 2006
New Revision: 392060
URL: http://svn.apache.org/viewcvs?rev=392060&view=rev
Log:
DERBY-1185 - Move all client messages to messages.properties.
I also got rid of the "XN" SQL State class and migrated those
over to XJ.
Similarly "0AX" warnings were migrated to "0AJ". This affected the
updatableResultSet test, so I updated those output files for JDK 1.3,
1.4 and 1.6.
Passes derbyall.
Removed:
db/derby/code/trunk/java/client/org/apache/derby/loc/clientmessages.properties
db/derby/code/trunk/java/client/org/apache/derby/loc/clientmessages_en.properties
Modified:
db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
db/derby/code/trunk/java/engine/org/apache/derby/iapi/error/StandardException.java
db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties
db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java?rev=392060&r1=392059&r2=392060&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java Thu Apr 6 13:14:33 2006
@@ -45,7 +45,10 @@
private static TreeSet clientMessageIds = new TreeSet();
/**
- * Initialize the set of shared message ids
+ * Initialize the set of message ids that the network client will use.
+ * <p>
+ * Note that all message ids that start with "XJ" are automatically added,
+ * these are just for message ids that have a different prefix.
*/
static void initClientMessageIds()
{
@@ -66,6 +69,18 @@
clientMessageIds.add(SQLState.INVALID_COLUMN_NAME);
clientMessageIds.add("J104");
clientMessageIds.add(SQLState.HOLDABLE_RESULT_SET_NOT_AVAILABLE);
+ clientMessageIds.add(SQLState.JDBC_METHOD_NOT_IMPLEMENTED);
+ clientMessageIds.add(SQLState.DRDA_NO_AUTOCOMMIT_UNDER_XA);
+ clientMessageIds.add(SQLState.DRDA_INVALID_XA_STATE_ON_COMMIT_OR_ROLLBACK);
+ clientMessageIds.add(SQLState.HOLDABLE_RESULT_SET_NOT_AVAILABLE);
+ clientMessageIds.add(SQLState.INVALID_RESULTSET_TYPE);
+ clientMessageIds.add(SQLState.INVALID_RESULTSET_CONCURRENCY);
+ clientMessageIds.add(SQLState.SCROLL_SENSITIVE_NOT_SUPPORTED);
+ clientMessageIds.add(SQLState.INSENSITIVE_UPDATABLE_NOT_SUPPORTED);
+ clientMessageIds.add(SQLState.UNABLE_TO_OBTAIN_MESSAGE_TEXT_FROM_SERVER );
+ clientMessageIds.add(SQLState.NUMBER_OF_ROWS_TOO_LARGE_FOR_INT);
+ clientMessageIds.add(SQLState.NOGETCONN_ON_CLOSED_POOLED_CONNECTION);
+ clientMessageIds.add(SQLState.LOB_METHOD_ON_CLOSED_CONNECTION);
}
public static void main(String[] args) throws Exception {
@@ -101,22 +116,7 @@
Properties clientProps = new Properties();
- // Open the client properties file for the given locale
- // from the client locales directory, and then intialize
- // clientProps with what we find in there
String clientPropsFileName = "clientmessages" + locale + ".properties";
- try
- {
- InputStream clientInStream = new FileInputStream(
- new File(clientDir, clientPropsFileName));
- clientProps.load(clientInStream);
- clientInStream.close();
- }
- catch ( FileNotFoundException fnfe )
- {
- // That's fine, it just means there are no client-specfic messages
- // for this locale yet
- }
for (Enumeration e = p.keys(); e.hasMoreElements(); ) {
String key = (String) e.nextElement();
Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/error/StandardException.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/error/StandardException.java?rev=392060&r1=392059&r2=392060&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/error/StandardException.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/error/StandardException.java Thu Apr 6 13:14:33 2006
@@ -288,13 +288,6 @@
return se;
}
- public static StandardException errorClose( Throwable t )
- {
- StandardException se = newException( SQLState.ERROR_CLOSE, t );
- se.report = REPORT_NEVER;
- return se;
- }
-
/* 0 arguments */
public static StandardException newException(String messageID) {
Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties?rev=392060&r1=392059&r2=392060&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties Thu Apr 6 13:14:33 2006
@@ -1139,12 +1139,42 @@
XJ085.S=Stream has already been read and end-of-file reached and cannot be re-used.
XJ086.S=This method cannot be invoked unless the cursor is positioned on the insert row.
XJ087.S=Invalid java.sql.Types type {0}.
+XJ088.S=Invalid operation: wasNull() called with no data retrieved.
+XJ089.S=Invalid method call: parameter 1 is an integer OUT parameter returned by the stored procedure, use getInt call.
+XJ090.S=Invalid parameter: calendar is null.
+XJ091.S=Invalid argument: parameter index {0} is not an OUT or INOUT parameter.
+XJ092.S=Parameter 1 is the return clause of the stored procedure call. It can only be registered as an integer type.
+XJ093.S=Length of BLOB/CLOB, {0}, is too large. The length cannot exceed {1}.
+XJ094.S=This object is already closed.
+XJ095.S=An attempt to execute a privileged action failed.
+XJ096.S=A resource bundle could not be found in the {0} package for {1}
+XJ097.S=Cannot rollback or release a savepoint that was not created by this connection.
+XJ098.S=The auto-generated keys value {0} is invalid
+XJ099.S=The Reader/Stream object does not contain length characters
+XJ100.S=Table name can not be null
+XJ104.S=Shared key length is invalid: {0}.
+XJ105.S=DES key has the wrong length, expected length {0}, got length {1}.
+XJ106.S=No such padding
+XJ107.S=Bad Padding
+XJ108.S=Illegal Block Size
+XJ110.S=Primary table name can not be null
+XJ111.S=Foreign table name can not be null
+XJ112.S=Security exception encountered, see next exception for details.
+XJ113.S=Unable to open file {0} : {1}
+
+#0A - feature not implemented
0A000.S=Feature not implemented: {0}.
+0A000.S.1=JDBC method is not yet implemented.
XJ004.C=Database ''{0}'' not found.
-08004=Connection refused : {0}
A020=Invalid authentication.
+
+# 08 - Connection exceptions
08003=No current connection.
+08003.C.1=getConnection() is not valid on a closed PooledConnection.
+08003.C.2=Lob method called after connection was closed
+08004=Connection refused : {0}
+
XJ028.C=The URL ''{0}'' is not properly formed.
XJ040.C=Failed to start database ''{0}'', see the next exception for details.
XJ041.C=Failed to create database ''{0}'', see the next exception for details.
@@ -1165,10 +1195,20 @@
01J05=Database upgrade succeeded. The upgraded database is now ready for use. Revalidating stored prepared statements failed. See next exception for details of failure.
01J06=ResultSet not updatable. Query does not qualify to generate an updatable ResultSet.
01J07=ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
+01J08=Unable to open resultSet type {0}. ResultSet type {1} opened.
+01J09=Unable to open ResultSet with concurrency {0}. ResultSet concurrency {1} is used.
+01J10=Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
+01J11=Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
+01J12=Unable to obtain message text from server. See the next exception. The stored procedure SYSIBM.SQLCAMESSAGE is not installed on the server. Please contact your database administrator.
+01J13=Number of rows returned ({0}) is too large to fit in an integer; the value returned will be truncated.
+
XJ001.U=Java exception: ''{1}: {0}''.
XJ050.U=Database requires upgrade from version {0}, set the attribute ''upgrade=true'' on the JDBC connection URL to allow upgrade to version {1}.
+# 2D - DRDA exceptions
+2D521.S.1=setAutoCommit(true) invalid during global transaction.
+2D521.S.2=COMMIT or ROLLBACK invalid for application execution environment.
# org.apache.derby.database.UserUtility
#
Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=392060&r1=392059&r2=392060&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java (original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java Thu Apr 6 13:14:33 2006
@@ -566,8 +566,6 @@
*/
String CONNECTIVITY_PREFIX="08";
- String ERROR_CLOSE = "08003";
-
/*
** Language
@@ -654,14 +652,6 @@
String LANG_DYNAMIC_RESULTS_RETURNED = "0100C";
String LANG_TOO_MANY_DYNAMIC_RESULTS_RETURNED = "0100E";
- // Warnings from the network client
- String INVALID_RESULTSET_TYPE = "01X00";
- String INVALID_RESULTSET_CONCURRENCY = "01X01";
- String SCROLL_SENSITIVE_NOT_SUPPORTED = "01X02";
- String INSENSITIVE_UPDATABLE_NOT_SUPPORTED = "01X03";
- String UNABLE_TO_OBTAIN_MESSAGE_TEXT_FROM_SERVER = "01X04";
- String NUMBER_OF_ROWS_TOO_LARGE_FOR_INT = "01X05";
-
// TRANSACTION severity language errors. These are in the range:
// 40XC0 - 40XCZ
@@ -1360,7 +1350,7 @@
String UNSUPPORTED_PREFIX="0A";
String NOT_IMPLEMENTED = "0A000.S";
- String JDBC_METHOD_NOT_IMPLEMENTED = "0AX01.S";
+ String JDBC_METHOD_NOT_IMPLEMENTED = "0A000.S.1";
@@ -1473,6 +1463,28 @@
String UPDATABLE_RESULTSET_API_DISALLOWED = "XJ083.U";
String COLUMN_NOT_FROM_BASE_TABLE = "XJ084.U";
String NOT_POSITIONED_ON_INSERT_ROW = "XJ086.S";
+ String WASNULL_INVALID = "XJ088.S";
+ String INVALID_PARAM_USE_GETINT = "XJ089.S";
+ String CALENDAR_IS_NULL = "XJ090.S";
+ String PARAM_NOT_OUT_OR_INOUT = "XJ091.S";
+ String RETURN_PARAM_MUST_BE_INT = "XJ092.S";
+ String BLOB_TOO_LARGE_FOR_CLIENT = "XJ093.S";
+ String OBJECT_ALREADY_CLOSED = "XJ094.S";
+ String ERROR_PRIVILEGED_ACTION = "XJ095.S";
+ String MISSING_RESOURCE_BUNDLE = "XJ096.S";
+ String SAVEPOINT_NOT_CREATED_BY_CONNECTION = "XJ097.S";
+ String BAD_AUTO_GEN_KEY_VALUE = "XJ098.S";
+ String READER_UNDER_RUN = "XJ099.S";
+ String TABLE_NAME_CANNOT_BE_NULL = "XJ100.S";
+ String SHARED_KEY_LENGTH_ERROR = "XJ104.S";
+ String DES_KEY_HAS_WRONG_LENGTH = "XJ105.S";
+ String CRYPTO_NO_SUCH_PADDING = "XJ106.S";
+ String CRYPTO_BAD_PADDING = "XJ107.S";
+ String CRYPTO_ILLEGAL_BLOCK_SIZE = "XJ108.S";
+ String PRIMARY_TABLE_NAME_IS_NULL = "XJ110.S";
+ String FOREIGN_TABLE_NAME_IS_NULL = "XJ111.S";
+ String SECURITY_EXCEPTION_ENCOUNTERED = "XJ112.S";
+ String UNABLE_TO_OPEN_FILE = "XJ113.S";
//following are session severity.
String DATABASE_NOT_FOUND = "XJ004.C";
@@ -1520,6 +1532,13 @@
String UPGRADE_SPSRECOMPILEFAILED = "01J05";
String QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET = "01J06";
String HOLDABLE_RESULT_SET_NOT_AVAILABLE = "01J07";
+ String INVALID_RESULTSET_TYPE = "01J08";
+ String INVALID_RESULTSET_CONCURRENCY = "01J09";
+ String SCROLL_SENSITIVE_NOT_SUPPORTED = "01J10";
+ String INSENSITIVE_UPDATABLE_NOT_SUPPORTED = "01J11";
+ String UNABLE_TO_OBTAIN_MESSAGE_TEXT_FROM_SERVER = "01J12";
+ String NUMBER_OF_ROWS_TOO_LARGE_FOR_INT = "01J13";
+
String CURSOR_OPERATION_CONFLICT = "01001";
@@ -1528,39 +1547,6 @@
String JAVA_EXCEPTION = "XJ001.U";
String UNSERIALIZABLE_CONNECTION = "XJ038.U";
String NO_UPGRADE = "XJ050.U";
-
- /**
- * Client-specific JDBC messages
- * We use the class XN to distinguish these from engine-specific or
- * shared message ids
- *
- * I don't try to organize by severity because it's just too hard
- * to keep track of the numbers to ensure we don't duplicate the
- * SQL State
- */
- String WASNULL_INVALID = "XN004.S";
- String INVALID_PARAM_USE_GETINT = "XN005.S";
- String CALENDAR_IS_NULL = "XN006.S";
- String PARAM_NOT_OUT_OR_INOUT = "XN009.S";
- String RETURN_PARAM_MUST_BE_INT = "XN010.S";
- String BLOB_TOO_LARGE_FOR_CLIENT = "XN011.S";
- String OBJECT_ALREADY_CLOSED = "XN012.S";
- String ERROR_PRIVILEGED_ACTION = "XN064.S";
- String MISSING_RESOURCE_BUNDLE = "XN065.S";
- String SAVEPOINT_NOT_CREATED_BY_CONNECTION = "XN067.S";
- String BAD_AUTO_GEN_KEY_VALUE = "XN069.S";
- String READER_UNDER_RUN = "XN070.S";
- String TABLE_NAME_CANNOT_BE_NULL = "XN100.S";
- String SHARED_KEY_LENGTH_ERROR = "XN104.S";
- String DES_KEY_HAS_WRONG_LENGTH = "XN105.S";
- String CRYPTO_NO_SUCH_PADDING = "XN106.S";
- String CRYPTO_BAD_PADDING = "XN107.S";
- String CRYPTO_ILLEGAL_BLOCK_SIZE = "XN108.S";
- String PRIMARY_TABLE_NAME_IS_NULL = "XN110.S";
- String FOREIGN_TABLE_NAME_IS_NULL = "XN111.S";
- String SECURITY_EXCEPTION_ENCOUNTERED = "XN112.S";
-
- String UNABLE_TO_OPEN_FILE = "XN151.S";
/*
** Messages whose SQL states are proscribed by DRDA
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out?rev=392060&r1=392059&r2=392060&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out Thu Apr 6 13:14:33 2006
@@ -1,6 +1,6 @@
Start testing delete and update using JDBC2.0 updateable resultset apis
Negative Testl - request for scroll insensitive updatable resultset will give a read only scroll insensitive resultset
-WARNING 01X03: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
+WARNING 01J11: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
Make sure that we got TYPE_SCROLL_INSENSITIVE? true
Make sure that we got CONCUR_READ_ONLY? true
@@ -13,7 +13,7 @@
SQL State : null
Got expected exception This method cannot be invoked while the cursor is on the insert row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll insensitive resultset
-WARNING 01X02: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
+WARNING 01J10: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
Jira issue Derby-154 : When client connects to Network Server using JCC, it incorrectly shows support for scroll sensitive updatable resultsets
Make sure that we got TYPE_SCROLL_INSENSITIVE? true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out?rev=392060&r1=392059&r2=392060&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out Thu Apr 6 13:14:33 2006
@@ -1,6 +1,6 @@
Start testing delete and update using JDBC2.0 updateable resultset apis
Negative Testl - request for scroll insensitive updatable resultset will give a read only scroll insensitive resultset
-WARNING 01X03: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
+WARNING 01J11: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
Make sure that we got TYPE_SCROLL_INSENSITIVE? true
Make sure that we got CONCUR_READ_ONLY? true
@@ -13,7 +13,7 @@
SQL State : null
Got expected exception This method cannot be invoked while the cursor is on the insert row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll insensitive resultset
-WARNING 01X02: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
+WARNING 01J10: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
Jira issue Derby-154 : When client connects to Network Server using JCC, it incorrectly shows support for scroll sensitive updatable resultsets
Make sure that we got TYPE_SCROLL_INSENSITIVE? true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out?rev=392060&r1=392059&r2=392060&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out Thu Apr 6 13:14:33 2006
@@ -1,6 +1,6 @@
Start testing delete and update using JDBC2.0 updateable resultset apis
Negative Testl - request for scroll insensitive updatable resultset will give a read only scroll insensitive resultset
-WARNING 01X03: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
+WARNING 01J11: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
Make sure that we got TYPE_SCROLL_INSENSITIVE? true
Make sure that we got CONCUR_READ_ONLY? true
@@ -13,7 +13,7 @@
SQL State : null
Got expected exception This method cannot be invoked while the cursor is on the insert row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll insensitive resultset
-WARNING 01X02: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
+WARNING 01J10: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
Jira issue Derby-154 : When client connects to Network Server using JCC, it incorrectly shows support for scroll sensitive updatable resultsets
Make sure that we got TYPE_SCROLL_INSENSITIVE? true