db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r393967 [1/4] - in /db/derby/code/trunk: java/build/org/apache/derbyBuild/ java/client/org/apache/derby/client/am/ java/client/org/apache/derby/loc/ java/engine/org/apache/derby/impl/jdbc/ java/engine/org/apache/derby/loc/ java/shared/org/a...
Date Thu, 13 Apr 2006 22:59:24 GMT
Author: davidvc
Date: Thu Apr 13 15:59:22 2006
New Revision: 393967

URL: http://svn.apache.org/viewcvs?rev=393967&view=rev
Log:

DERBY-842 : Internationalize messages in PreparedStatement.java to
Section.java in client/am.  

This passes derbyall on JDK14.  I also verified that the tests whose
master files affected in the JDK14 run were also run on JDK13 and JDK16
and fixed output files for those platforms as well, as needed.

I also removed a few spurious SQL States based on the test I ran to find
SQL States with no messages.  More of those to come in a separate patch.

Removed:
    db/derby/code/trunk/java/client/org/apache/derby/loc/
Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/BatchUpdateException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Savepoint.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.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/i18n/MessageUtil.java
    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/LOBTest.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorJava.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/LOBTest.out
    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/parameterMapping.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/parameterMapping.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/procedureJdbc30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/resultset.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/savepointJdbc30_JSR169.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/savepointJdbc30_XA.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
    db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed

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=393967&r1=393966&r2=393967&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 13 15:59:22 2006
@@ -69,6 +69,8 @@
         clientMessageIds.add(SQLState.INVALID_COLUMN_NAME);
         clientMessageIds.add("J104");
         clientMessageIds.add(SQLState.HOLDABLE_RESULT_SET_NOT_AVAILABLE);
+        clientMessageIds.add(SQLState.LANG_RETURN_OUTPUT_PARAM_CANNOT_BE_SET);
+        clientMessageIds.add(SQLState.LANG_NULL_INTO_NON_NULL);
         clientMessageIds.add(SQLState.JDBC_METHOD_NOT_IMPLEMENTED);
         clientMessageIds.add(SQLState.JDBC_METHOD_NOT_SUPPORTED_BY_SERVER);
         clientMessageIds.add(SQLState.DRDA_NO_AUTOCOMMIT_UNDER_XA);
@@ -82,6 +84,10 @@
         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);
+        clientMessageIds.add(SQLState.LANG_INVALID_PARAM_POSITION);
+        clientMessageIds.add(SQLState.LANG_MISSING_PARMS);
+        clientMessageIds.add(SQLState.LANG_NO_CURRENT_ROW);
+        clientMessageIds.add(SQLState.LANG_STREAM_RETRIEVED_ALREADY);
     }
 
 	public static void main(String[] args) throws Exception {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/BatchUpdateException.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/BatchUpdateException.java?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/BatchUpdateException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/BatchUpdateException.java Thu Apr 13 15:59:22 2006
@@ -20,69 +20,72 @@
 
 package org.apache.derby.client.am;
 
-import org.apache.derby.client.resources.ResourceKeys;
-
+import org.apache.derby.iapi.services.info.JVMInfo;
+import org.apache.derby.shared.common.i18n.MessageUtil;
+import org.apache.derby.shared.common.error.ExceptionUtil;
 
 public class BatchUpdateException extends java.sql.BatchUpdateException {
 
-    //-----------------constructors-----------------------------------------------
-
-    public BatchUpdateException(LogWriter logWriter, ErrorKey errorKey, int[] updateCounts) {
-        super(ResourceUtilities.getResource(ResourceKeys.driverOriginationIndicator) +
-                ResourceUtilities.getResource(errorKey.getResourceKey()),
-                errorKey.getSQLState(),
-                errorKey.getErrorCode(),
-                updateCounts);
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
+    /** 
+     *  The message utility instance we use to find messages
+     *  It's primed with the name of the client message bundle so that
+     *  it knows to look there if the message isn't found in the
+     *  shared message bundle.
+     */
+    private static MessageUtil msgutil_ = 
+        new MessageUtil(SqlException.CLIENT_MESSAGE_RESOURCE_NAME);
+
+    public BatchUpdateException(LogWriter logWriter, MessageId msgid,
+        Object[] args, int[] updateCounts)
+    {
+        super(
+            msgutil_.getCompleteMessage(
+                msgid.msgid,
+                args),
+            ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
+            ExceptionUtil.getSeverityFromIdentifier(msgid.msgid),
+            updateCounts);
 
-    public BatchUpdateException(LogWriter logWriter, ErrorKey errorKey, Object[] args, int[] updateCounts) {
-        super(ResourceUtilities.getResource(ResourceKeys.driverOriginationIndicator) +
-                ResourceUtilities.getResource(errorKey.getResourceKey(), args),
-                errorKey.getSQLState(),
-                errorKey.getErrorCode(),
-                updateCounts);
         if (logWriter != null) {
             logWriter.traceDiagnosable(this);
         }
     }
-
-    public BatchUpdateException(LogWriter logWriter, ErrorKey errorKey, Object arg, int[] updateCounts) {
-        this(logWriter, errorKey, new Object[]{arg}, updateCounts);
-    }
+    
+    // Syntactic sugar constructors to make it easier to create
+    // a BatchUpdateException with substitution parameters
+    public BatchUpdateException(LogWriter logWriter, MessageId msgid,
+        int[] updateCounts)
+    {
+        this(logWriter, msgid, (Object [])null, updateCounts);
+    }
+    
+    public BatchUpdateException(LogWriter logWriter, MessageId msgid,
+        Object arg1, int[] updateCounts)
+    {
+        this(logWriter, msgid, new Object[] {arg1}, updateCounts);
+    }
+    
+    //-----------------old constructors - to be removed when i18n is complete
+    //-----------------------------------------------
 
     // Temporary constructor until all error keys are defined.
     public BatchUpdateException(LogWriter logWriter) {
-        super(null, null, -99999, null);
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
+        this(logWriter, null, null, SqlException.DEFAULT_ERRCODE, null);
     }
 
     // Temporary constructor until all error keys are defined.
     public BatchUpdateException(LogWriter logWriter, int[] updateCounts) {
-        super(null, null, -99999, updateCounts);
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
+        this(logWriter, null, null, SqlException.DEFAULT_ERRCODE, updateCounts);
     }
 
     // Temporary constructor until all error keys are defined.
     public BatchUpdateException(LogWriter logWriter, String reason, int[] updateCounts) {
-        super(reason, null, -99999, updateCounts);
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
+        this(logWriter, reason, null, SqlException.DEFAULT_ERRCODE, updateCounts);
     }
 
     // Temporary constructor until all error keys are defined.
     public BatchUpdateException(LogWriter logWriter, String reason, String sqlState, int[] updateCounts) {
-        super(reason, sqlState, -99999, updateCounts);
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
+        this(logWriter, reason, sqlState, SqlException.DEFAULT_ERRCODE, updateCounts);
     }
 
     // Temporary constructor until all error keys are defined.

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java Thu Apr 13 15:59:22 2006
@@ -20,6 +20,8 @@
 
 package org.apache.derby.client.am;
 
+import org.apache.derby.shared.common.reference.SQLState;
+
 import java.io.InputStream;
 import java.io.Reader;
 import java.sql.SQLException;
@@ -178,7 +180,8 @@
             section_ = agent_.sectionManager_.getPositionedUpdateSection(cursorName, false); // false means get a regular section
 
             if (section_ == null) {
-                throw new SqlException(agent_.logWriter_, "Invalid cursor name \"" + cursorName + "\" in the Update/Delete statement.");
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.CURSOR_INVALID_CURSOR_NAME), cursorName);
             }
 
             //scrollableRS_ = agent_.sectionManager_.getPositionedUpdateResultSet (cursorName);
@@ -250,9 +253,8 @@
             agent_.logWriter_.traceEntry(this, "execute", sql);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.execute (String sql) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.execute () with no sql string argument.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "execute(String)").getSQLException();
     }
 
     public java.sql.ResultSet executeQuery(String sql) throws SQLException {
@@ -260,9 +262,8 @@
             agent_.logWriter_.traceEntry(this, "executeQuery", sql);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.executeQuery (String sql) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.executeQuery () with no sql string argument.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "executeQuery(String)").getSQLException();
     }
 
     public int executeUpdate(String sql) throws SQLException {
@@ -270,9 +271,8 @@
             agent_.logWriter_.traceEntry(this, "executeUpdate", sql);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.executeUpdate (String sql) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.executeUpdate () with no sql string argument.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "executeUpdate(String)").getSQLException();
     }
     // ---------------------------jdbc 1------------------------------------------
 
@@ -358,8 +358,9 @@
         parameterMetaData_.clientParamtertype_[parameterIndex - 1] = jdbcType;
 
         if (!parameterMetaData_.nullable_[parameterIndex - 1]) {
-            throw new SqlException(agent_.logWriter_, "PreparedStatement: setNull method setting a non-nullable " +
-                    "input parameter " + parameterIndex + " to null.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.LANG_NULL_INTO_NON_NULL),
+                new Integer(parameterIndex));
         }
         setInput(parameterIndex, null);
     }
@@ -574,7 +575,9 @@
                     agent_.logWriter_.traceEntry(this, "setDate", parameterIndex, x, calendar);
                 }
                 if (calendar == null) {
-                    throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.INVALID_API_PARAMETER),
+                        "null", "calendar", "setDate");
                 }
                 java.util.Calendar targetCalendar = java.util.Calendar.getInstance(calendar.getTimeZone());
                 targetCalendar.clear();
@@ -628,7 +631,9 @@
                     agent_.logWriter_.traceEntry(this, "setTime", parameterIndex, x, calendar);
                 }
                 if (calendar == null) {
-                    throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");
+                    throw new SqlException(agent_.logWriter_,
+                        new MessageId(SQLState.INVALID_API_PARAMETER),
+                        "null", "calendar", "setTime()");
                 }
                 java.util.Calendar targetCalendar = java.util.Calendar.getInstance(calendar.getTimeZone());
                 targetCalendar.clear();
@@ -685,7 +690,9 @@
                     agent_.logWriter_.traceEntry(this, "setTimestamp", parameterIndex, x, calendar);
                 }
                 if (calendar == null) {
-                    throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.INVALID_API_PARAMETER),
+                        "null", "calendar", "setTimestamp()");
                 }
                 java.util.Calendar targetCalendar = java.util.Calendar.getInstance(calendar.getTimeZone());
                 targetCalendar.clear();
@@ -929,7 +936,8 @@
                     agent_.logWriter_.traceEntry(this, "setArray", parameterIndex, x);
                 }
                 parameterIndex = checkSetterPreconditions(parameterIndex);
-                throw new SqlException(agent_.logWriter_, "jdbc 2 method not yet implemented");
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED));
             }
         }
         catch ( SqlException se )
@@ -946,7 +954,8 @@
                     agent_.logWriter_.traceEntry(this, "setRef", parameterIndex, x);
                 }
                 parameterIndex = checkSetterPreconditions(parameterIndex);
-                throw new SqlException(agent_.logWriter_, "jdbc 2 method not yet implemented").getSQLException();
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED));
             }
         }
         catch ( SqlException se )
@@ -1002,8 +1011,8 @@
                     setByte(parameterIndex, ((Byte) x).byteValue());
                 } else {
                     checkSetterPreconditions(parameterIndex);
-                    throw new SqlException(agent_.logWriter_, "Invalid data conversion:" +
-                            " Parameter object type is invalid for requested conversion.");
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.UNSUPPORTED_TYPE));
                 }
             }
         }
@@ -1075,7 +1084,9 @@
         } catch (ArithmeticException ae) {
             // Any problems with scale should have already been caught by
             // checkForvalidScale
-            throw new SqlException(agent_.logWriter_, ae.getMessage());
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.JAVA_EXCEPTION),
+                new Object[] {ae.getClass().getName(), ae.getMessage()}, ae);
         }
         try { 
             setObject(parameterIndex, x);
@@ -1227,9 +1238,8 @@
             agent_.logWriter_.traceEntry(this, "execute", sql, autoGeneratedKeys);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.execute (String sql, int autoGeneratedKeys) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.execute () with no arguments.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "execute(String, int)").getSQLException();
     }
 
     public boolean execute(String sql, String[] columnNames) throws SQLException {
@@ -1237,9 +1247,8 @@
             agent_.logWriter_.traceEntry(this, "execute", sql, columnNames);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.execute (String sql, String[] columnNames) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.execute () with no arguments.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "execute(String, String[])").getSQLException();
     }
 
     public boolean execute(String sql, int[] columnIndexes) throws SQLException {
@@ -1247,9 +1256,8 @@
             agent_.logWriter_.traceEntry(this, "execute", sql, columnIndexes);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.execute (String sql, int[] columnIndexes) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.execute () with no arguments.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "execute(String, int[])").getSQLException();
     }
 
     public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
@@ -1257,9 +1265,8 @@
             agent_.logWriter_.traceEntry(this, "executeUpdate", autoGeneratedKeys);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.executeUpdate (String sql, int autoGeneratedKeys) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.executeUpdate () with no arguments.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "executeUpdate(String, int)").getSQLException();
     }
 
     public int executeUpdate(String sql, String[] columnNames) throws SQLException {
@@ -1267,9 +1274,8 @@
             agent_.logWriter_.traceEntry(this, "executeUpdate", columnNames);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.executeUpdate (String sql, String[] columnNames) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.executeUpdate () with no arguments.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "executeUpdate(String, String[])").getSQLException();
     }
 
     public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
@@ -1277,9 +1283,8 @@
             agent_.logWriter_.traceEntry(this, "executeUpdate", columnIndexes);
         }
         throw new SqlException(agent_.logWriter_,
-                "The method java.sql.Statement.executeUpdate (String sql, int[] columnIndexes) cannot be called on a " +
-                " prepared statement instance." +
-                " Use java.sql.PreparedStatement.executeUpdate () with no arguments.").getSQLException();
+            new MessageId(SQLState.NOT_FOR_PREPARED_STATEMENT),
+            "execute(String, int[])").getSQLException();
     }
 
     public void setURL(int parameterIndex, java.net.URL x) throws SQLException {
@@ -1532,8 +1537,7 @@
             {
                 // Generate a SqlException for this, we don't want to throw
                 // SQLException in this internal method
-                throw new SqlException(agent_.logWriter_, se, se.getMessage(),
-                    se.getSQLState(), se.getErrorCode());
+                throw new SqlException(se);
             }
             boolean chainAutoCommit = false;
             boolean commitSubstituted = false;
@@ -1718,8 +1722,9 @@
 
             // Throw an exception if holdability returned by the server is different from requested.
             if (resultSet_ != null && resultSet_.resultSetHoldability_ != resultSetHoldability_ && sqlMode_ != isCall__) {
-                throw new SqlException(agent_.logWriter_, "Unable to open resultSet with requested " +
-                        "holdability " + resultSetHoldability_ + ".");
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.UNABLE_TO_OPEN_RESULTSET_WITH_REQUESTED_HOLDABILTY),
+                        new Integer(resultSetHoldability_));
             }
     }
 
@@ -1755,7 +1760,9 @@
 		// and the values 0 and 0xffff are reserved as special values. So
 		// that imposes an upper limit on the batch size we can support:
 		if (batchSize > 65534)
-            throw new BatchUpdateException(agent_.logWriter_, "No more than 65534 commands may be added to a single batch", updateCounts);
+            throw new BatchUpdateException(agent_.logWriter_, 
+                new MessageId(SQLState.TOO_MANY_COMMANDS_FOR_BATCH), 
+                new Integer(65534), updateCounts);
 
         // Initialize all the updateCounts to indicate failure
         // This is done to account for "chain-breaking" errors where we cannot
@@ -1765,10 +1772,13 @@
         }
 
         if (!supportsQueryBatchRequest && sqlMode_ == isQuery__) {
-            throw new BatchUpdateException(agent_.logWriter_, "Batching of queries not allowed by J2EE compliance", updateCounts);
+            throw new BatchUpdateException(agent_.logWriter_, 
+                new MessageId(SQLState.CANNOT_BATCH_QUERIES), updateCounts);
         }
         if (supportsQueryBatchRequest && sqlMode_ != isQuery__) {
-            throw new BatchUpdateException(agent_.logWriter_, "Query batch requested on a non-query statement", updateCounts);
+            throw new BatchUpdateException(agent_.logWriter_, 
+                new MessageId(SQLState.QUERY_BATCH_ON_NON_QUERY_STATEMENT), 
+                updateCounts);
         }
 
         resultSetList_ = null;
@@ -1812,7 +1822,9 @@
                         chainAutoCommit || (i != batchSize - 1));  // more statements to chain
             } else if (outputRegistered_) // make sure no output parameters are registered
             {
-                throw new BatchUpdateException(agent_.logWriter_, "No output parameters are allowed in batch updates", updateCounts);
+                throw new BatchUpdateException(agent_.logWriter_, 
+                    new MessageId(SQLState.OUTPUT_PARAMS_NOT_ALLOWED),
+                    updateCounts);
             } else {
                 writeExecuteCall(false, // no output expected for batched CALLs
                         null, // no procedure name supplied for prepared CALLs
@@ -1930,8 +1942,10 @@
 
     void checkForValidParameterIndex(int parameterIndex) throws SqlException {
         if (parameterMetaData_ == null || parameterIndex < 1 || parameterIndex > parameterMetaData_.columns_) {
-            throw new SqlException(agent_.logWriter_, "Invalid argument: parameter index " +
-                    parameterIndex + " is out of range.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.LANG_INVALID_PARAM_POSITION),
+                new Integer(parameterIndex), 
+                new Integer(parameterMetaData_.columns_));
         }
     }
 
@@ -1939,7 +1953,8 @@
         if (parameterMetaData_ != null) {
             for (int i = 0; i < parameterMetaData_.columns_; i++) {
                 if (!parameterSet_[i] && !parameterRegistered_[i]) {
-                    throw new SqlException(agent_.logWriter_, "At least one parameter to the current statement is uninitialized.", "07000");
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.LANG_MISSING_PARMS));
                 }
             }
         }
@@ -1950,8 +1965,7 @@
         if (escapedProcedureCallWithResult_) {
             if (parameterIndex == 1) {
                 throw new SqlException(agent_.logWriter_,
-                        "Invalid attempt to set the return value parameter of a CALL statement." +
-                        "Return value parameter of {?=CALL foo(?,?)} statement is parameter 1.");
+                    new MessageId(SQLState.LANG_RETURN_OUTPUT_PARAM_CANNOT_BE_SET));
             } else {
                 parameterIndex--;
             }
@@ -1961,7 +1975,9 @@
 
     void checkForValidScale(int scale) throws SqlException {
         if (scale < 0 || scale > 31) {
-            throw new SqlException(agent_.logWriter_, "Invalid argument: scale must be greater than or equal to 0 and less than 32.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.BAD_SCALE_VALUE),
+                new Integer(scale));
         }
     }
 
@@ -1979,8 +1995,9 @@
             }
             // if the new Decimal (with bigger scale) cannot fit into the DA
             if ((32 - scaleDifference) < inputLength) {
-                throw new SqlException(agent_.logWriter_, "The scale supplied by the registerOutParameter method does " +
-                        "not match with the setter method. Possible loss of precision!");
+                // TODO - FINISH THIS
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.REGOUTPARAM_SCALE_DOESNT_MATCH_SETTER));
             }
             // if the new Decimal (with bigger scale) can fit
             else {
@@ -1997,8 +2014,8 @@
                 parameterMetaData_.sqlScale_[parameterIndex - 1] = registerOutScale;
             } catch (ArithmeticException e) {
                 // if the new Decimal (with smaller scale) cannot fit into the DA
-                throw new SqlException(agent_.logWriter_, "The scale supplied by the registerOutParameter method does " +
-                        "not match with the setter method. Possible loss of precision!");
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.REGOUTPARAM_SCALE_DOESNT_MATCH_SETTER));
             }
         }
     }
@@ -2048,8 +2065,9 @@
                         parameterIndex, reader, new Long(length));
             }
             if(length > Integer.MAX_VALUE)
-                throw new SQLException("CLOB length exceeds maximum " +
-                        "possible limit");
+                throw new SqlException(agent_.logWriter_,
+                    new MessageId(SQLState.BLOB_TOO_LARGE_FOR_CLIENT),
+                    new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException();
             else
                 setInput(parameterIndex, new Clob(agent_, reader, (int)length));
         }
@@ -2078,8 +2096,9 @@
                         inputStream, new Long(length));
             }
             if(length > Integer.MAX_VALUE)
-                throw new SQLException("BLOB length exceeds maximum " +
-                        "possible limit");
+                throw new SqlException(agent_.logWriter_,
+                    new MessageId(SQLState.BLOB_TOO_LARGE_FOR_CLIENT),
+                    new Long(length), new Integer(Integer.MAX_VALUE)).getSQLException();
             else {
                 try {
                     setBinaryStreamX(parameterIndex, inputStream, (int)length);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java Thu Apr 13 15:59:22 2006
@@ -521,7 +521,8 @@
             checkForClosedResultSet();
 
             if (wasNull_ == ResultSet.WAS_NULL_UNSET) {
-                throw new SqlException(agent_.logWriter_, "Invalid operation: wasNull() called with no data retrieved");
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.WASNULL_INVALID));
             }
 
             if (agent_.loggingEnabled()) {
@@ -875,7 +876,8 @@
                 agent_.logWriter_.traceEntry(this, "getDate", column, calendar);
             }
             if (calendar == null) {
-                throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.CALENDAR_IS_NULL));
             }
             java.sql.Date date = getDate(column);
             if (date != null) {
@@ -939,7 +941,8 @@
                 agent_.logWriter_.traceEntry(this, "getTime", column, calendar);
             }
             if (calendar == null) {
-                throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");
+                throw new SqlException(agent_.logWriter_,
+                    new MessageId(SQLState.CALENDAR_IS_NULL));
             }
             java.sql.Time time = getTime(column);
             if (time != null) {
@@ -1003,7 +1006,8 @@
                 agent_.logWriter_.traceEntry(this, "getTimestamp", column, calendar);
             }
             if (calendar == null) {
-                throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");
+                throw new SqlException(agent_.logWriter_, 
+                    new MessageId(SQLState.CALENDAR_IS_NULL));
             }
             java.sql.Timestamp timestamp = getTimestamp(column);
             if (timestamp != null) {
@@ -1171,7 +1175,9 @@
                             (((String) agent_.crossConverters_.setObject(java.sql.Types.CHAR,
                                     updatedColumns_[column - 1])).getBytes("UTF-8"));
                 } catch (java.io.UnsupportedEncodingException e) {
-                    throw new SqlException(agent_.logWriter_, e, e.getMessage());
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.UNSUPPORTED_ENCODING),
+                        "String", "java.io.ByteArrayInputStream(UTF-8)", e);
                 }
             } else {
                 result = isNull(column) ? null : cursor_.getUnicodeStream(column);
@@ -1290,7 +1296,8 @@
             checkGetterPreconditions(column);
             java.sql.Ref result = isNull(column) ? null : cursor_.getRef(column);
             if (true) {
-                throw new SqlException(agent_.logWriter_, "jdbc 2 method not yet implemented");
+                throw new SqlException(agent_.logWriter_,
+                    new MessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED));
             }
             if (agent_.loggingEnabled()) {
                 agent_.logWriter_.traceExit(this, "getRef", result);
@@ -1316,7 +1323,8 @@
             checkGetterPreconditions(column);
             java.sql.Array result = isNull(column) ? null : cursor_.getArray(column);
             if (true) {
-                throw new SqlException(agent_.logWriter_, "jdbc 2 method not yet implemented");
+                throw new SqlException(agent_.logWriter_,
+                    new MessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED));
             }
             if (agent_.loggingEnabled()) {
                 agent_.logWriter_.traceExit(this, "getArray", result);
@@ -1381,7 +1389,8 @@
                 result = isNull(column) ? null : cursor_.getObject(column);
             }
             if (true) {
-                throw new SqlException(agent_.logWriter_, "jdbc 2 method not yet implemented");
+                throw new SqlException(agent_.logWriter_,
+                    new MessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED));
             }
             if (agent_.loggingEnabled()) {
                 agent_.logWriter_.traceExit(this, "getObject", result);
@@ -2433,7 +2442,8 @@
 
         // this method may not be called when the cursor on the insert row
         if (isOnInsertRow_) {
-            throw new SqlException(agent_.logWriter_, "Cursor is Not on a Valid Row");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
         }
 
         // If the resultset is empty, relative(n) is a null operation
@@ -2601,7 +2611,9 @@
                     fetchDirection_ = direction;
                     break;
                 default:
-                    throw new SqlException(agent_.logWriter_, "Invalid fetch direction " + direction);
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.INVALID_FETCH_DIRECTION),
+                        new Integer(direction));
                 }
             }
         }
@@ -2635,7 +2647,9 @@
                 }
                 checkForClosedResultSet();
                 if (rows < 0 || (maxRows_ != 0 && rows > maxRows_)) {
-                    throw new SqlException(agent_.logWriter_, "Invalid fetch size " + rows).getSQLException();
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.INVALID_FETCH_SIZE),
+                        new Integer(rows)).getSQLException();
                 }
                 setFetchSize_(rows);
             }
@@ -2755,7 +2769,9 @@
                 }
                 checkUpdatePreconditions(column);
                 if (!resultSetMetaData_.nullable_[column - 1]) {
-                    throw new SqlException(agent_.logWriter_, "Invalid operation to update a non-nullable column to null.");
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.LANG_NULL_INTO_NON_NULL),
+                        new Integer(column));
                 }
                 updateColumn(column, null);
             }
@@ -3373,14 +3389,14 @@
     private void insertRowX() throws SqlException {
         checkForClosedResultSet();
         if (isOnCurrentRow_ || resultSetConcurrency_ == java.sql.ResultSet.CONCUR_READ_ONLY) {
-            throw new SqlException(agent_.logWriter_, "This method cannot be invoked while the cursor is not on the insert " +
-                    "row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_NOT_POSITIONED_ON_INSERT_ROW));
        }
  
         // if not on a valid row, then do not accept updateXXX calls
         if (!isValidCursorPosition_) {
-            throw new SqlException(agent_.logWriter_, "Invalid operation to " +
-                    "insert at current cursor position");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
         }
 
         // User might not be updating all the updatable columns selected in the
@@ -3440,14 +3456,14 @@
     private boolean updateRowX() throws SqlException {
         checkForClosedResultSet();
         if (isOnInsertRow_ || resultSetConcurrency_ == java.sql.ResultSet.CONCUR_READ_ONLY) {
-            throw new SqlException(agent_.logWriter_, "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.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_NOT_POSITIONED_ON_INSERT_ROW));
         }
 
         //if not on a valid row, then do not accept updateXXX calls
         if (!isValidCursorPosition_)
-            throw new SqlException(agent_.logWriter_, "Invalid operation to " +
-                    "update at current cursor position");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
 
         // If no updateXXX has been called on this ResultSet object, then
         // updatedColumns_ will be null and hence no action required
@@ -3556,8 +3572,8 @@
         resetUpdatedColumns();
 
         if (isOnInsertRow_ || resultSetConcurrency_ == java.sql.ResultSet.CONCUR_READ_ONLY) {
-            throw new SqlException(agent_.logWriter_, "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.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_NOT_POSITIONED_ON_INSERT_ROW));
         }
 
         if (preparedStatementForDelete_ == null) {
@@ -3601,9 +3617,7 @@
         if (isBeforeFirstX() || isAfterLastX() || isOnInsertRow_ ||
                 resultSetConcurrency_ == java.sql.ResultSet.CONCUR_READ_ONLY) {
             throw new SqlException(agent_.logWriter_,
-                    "This method cannot be invoked while the cursor is on the insert " +
-                    "row, if the cursor is not on a valid row, or if this ResultSet " +
-                    "object has a concurrency of CONCUR_READ_ONLY.");
+                new MessageId(SQLState.CURSOR_CANNOT_INVOKE_ON_INSROW_OR_INVALIDROW_OR_READONLY));
         }
 
 	
@@ -3630,14 +3644,14 @@
                 }
                 checkForClosedResultSet();
                 if (isOnInsertRow_ || resultSetConcurrency_ == java.sql.ResultSet.CONCUR_READ_ONLY) {
-                    throw new SqlException(agent_.logWriter_, "This method cannot be invoked while the cursor is on the insert " +
-                            "row or if this ResultSet object has a concurrency of CONCUR_READ_ONLY.");
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.CURSOR_NOT_POSITIONED_ON_INSERT_ROW));
                 }
 
                 // if not on a valid row, then do not accept cancelRowUpdates call
                 if (!isValidCursorPosition_)
-                    throw new SqlException(agent_.logWriter_, "Invalid operation " +
-                            "at current cursor position.");
+                    throw new SqlException(agent_.logWriter_, 
+                        new MessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
 
                 // if updateRow() has already been called, then cancelRowUpdates should have
                 // no effect.  updateRowCalled_ is reset to false as soon as the cursor moves to a new row.
@@ -3660,7 +3674,7 @@
                     agent_.logWriter_.traceEntry(this, "moveToInsertRow");
                 }
                 checkForClosedResultSet();
-                checkUpdatableCursor();
+                checkUpdatableCursor("moveToInsertRow()");
 
                 resetUpdatedColumnsForInsert();
 
@@ -3683,7 +3697,7 @@
                     agent_.logWriter_.traceEntry(this, "moveToCurrentRow");
                 }
                 checkForClosedResultSet();
-                checkUpdatableCursor();
+                checkUpdatableCursor("moveToCurrentRow()");
 
                 if (!isOnInsertRow_) {
                     // no affect
@@ -4455,7 +4469,8 @@
         String updateString = buildUpdateString();
 
         if (updateString == null) {
-            throw new SqlException(agent_.logWriter_, "No updateXXX issued on this row.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_NO_UPDATE_CALLS_ON_CURRENT_ROW));
         }
         preparedStatementForUpdate_ =
                 statement_.connection_.preparePositionedUpdateStatement(updateString,
@@ -4516,42 +4531,48 @@
         checkForClosedResultSet();
         checkForValidColumnIndex(column);
         if (resultSetConcurrency_ != java.sql.ResultSet.CONCUR_UPDATABLE) {
-            throw new SqlException(agent_.logWriter_, "ResultSet is not updatable.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.UPDATABLE_RESULTSET_API_DISALLOWED),
+                "updateXXX");
         }
         if (!isOnCurrentRow_ && !isOnInsertRow_) {
-            throw new SqlException(agent_.logWriter_, "This method must be called to update values in the current row " +
-                    "or the insert row");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_NOT_ON_CURRENT_OR_INSERT_ROW));
         }
 
         if (resultSetMetaData_.sqlxUpdatable_ == null || resultSetMetaData_.sqlxUpdatable_[column - 1] != 1) {
-            throw new SqlException(agent_.logWriter_, "Column not updatable");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_COLUMN_NOT_UPDATABLE));
         }
 
         //if not on a valid row, then do not accept updateXXX calls
         if (!isValidCursorPosition_)
-            throw new SqlException(agent_.logWriter_, "Invalid operation to " +
-                    "update at current cursor position");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
     }
 
     final void checkForValidColumnIndex(int column) throws SqlException {
         if (column < 1 || column > resultSetMetaData_.columns_) {
-            throw new SqlException(agent_.logWriter_, "Invalid argument: parameter index " +
-                    column + " is out of range.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.LANG_INVALID_COLUMN_POSITION),
+                new Integer(column), new Integer(resultSetMetaData_.columns_));
         }
     }
 
-    private void checkUpdatableCursor() throws SqlException {
+    private void checkUpdatableCursor(String methodName) throws SqlException {
         if (resultSetConcurrency_ == java.sql.ResultSet.CONCUR_READ_ONLY) {
-            throw new SqlException(agent_.logWriter_, 
-                    "This method should only be called on ResultSet objects " +
-                    "that are updatable(concurrency type CONCUR_UPDATABLE).");
+            throw new SqlException(agent_.logWriter_,
+                new MessageId(SQLState.UPDATABLE_RESULTSET_API_DISALLOWED),
+                methodName);
         }
     }
 
     protected final void checkForClosedResultSet() throws SqlException {
         if (!openOnClient_) {
             agent_.checkForDeferredExceptions();
-            throw new SqlException(agent_.logWriter_, "Invalid operation: result set closed");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.ALREADY_CLOSED),
+                "ResultSet");
         } else {
             agent_.checkForDeferredExceptions();
         }
@@ -4559,20 +4580,22 @@
 
     private final void checkForValidCursorPosition() throws SqlException {
         if (!isValidCursorPosition_) {
-            throw new SqlException(agent_.logWriter_, "Invalid operation to read at current cursor position.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
         }
     }
 
     private final void checkThatResultSetTypeIsScrollable() throws SqlException {
         if (resultSetType_ == java.sql.ResultSet.TYPE_FORWARD_ONLY) {
-            throw new SqlException(agent_.logWriter_, "This method should only be called on ResultSet objects that are " +
-                    "scrollable(type TYPE_SCROLL_SENSITIVE or TYPE_SCROLL_INSENSITIVE)");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_MUST_BE_SCROLLABLE));
         }
     }
 
     private final void checkThatResultSetIsNotDynamic() throws SqlException {
         if (sensitivity_ == sensitivity_sensitive_dynamic__) {
-            throw new SqlException(agent_.logWriter_, "This method should not be called on sensitive dynamic cursors.");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_INVALID_FOR_SENSITIVE_DYNAMIC));
         }
     }
 
@@ -5236,12 +5259,10 @@
 			try{
 				is_.close();
 				
-			}catch(IOException e){
-				
+			}catch(IOException e){				
 				throw new SqlException(agent_.logWriter_ ,
-						       e ,
-						       "Failed to close inputStream.");
-				
+                    new MessageId(SQLState.JAVA_EXCEPTION), 
+                    "java.io.IOException", e.getMessage(), e);
 			}
 			
 			is_ = null;
@@ -5254,7 +5275,7 @@
 	
 	if(streamUsedFlags_[columnIndex - 1]){
 	    throw new SqlException(agent_.logWriter_,
-				   "Stream of column value in result cannot be retrieved twice");
+            new MessageId(SQLState.LANG_STREAM_RETRIEVED_ALREADY));
 	}
 
 	streamUsedFlags_[columnIndex - 1] = true;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Savepoint.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/Savepoint.java?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Savepoint.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Savepoint.java Thu Apr 13 15:59:22 2006
@@ -20,6 +20,8 @@
 
 package org.apache.derby.client.am;
 
+import org.apache.derby.shared.common.reference.SQLState;
+
 import java.sql.SQLException;
 
 public class Savepoint implements java.sql.Savepoint {
@@ -49,7 +51,8 @@
         if (savepointId_ != 0) {
             return savepointId_;
         } else {
-            throw new SqlException(agent_.logWriter_, "This is a named savepoint.").getSQLException();
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.NO_ID_FOR_NAMED_SAVEPOINT)).getSQLException();
         }
     }
 
@@ -57,7 +60,8 @@
         if (savepointName_ != null) {
             return savepointName_;
         } else {
-            throw new SqlException(agent_.logWriter_, "This is an un-named savepoint.").getSQLException();
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.NO_NAME_FOR_UNNAMED_SAVEPOINT)).getSQLException();
         }
     }
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java Thu Apr 13 15:59:22 2006
@@ -121,17 +121,19 @@
             ExceptionUtil.getSQLStateFromIdentifier(msgid.msgid),
             ExceptionUtil.getSeverityFromIdentifier(msgid.msgid));
         
-        this.setThrowable(cause);
+        if ( cause != null ) {
+            this.setThrowable(cause);
+        }
     }
  
     public SqlException (LogWriter logwriter, 
             MessageId msgid, Throwable cause) {
-        this (logwriter, msgid, null, cause);
+        this (logwriter, msgid, (Object[])null, cause);
     }
     
     public SqlException(LogWriter logwriter, MessageId msgid, Object[] args)
     {
-        this(logwriter, msgid, args, null);
+        this(logwriter, msgid, args, (Throwable)null);
     }
     
     public SqlException (LogWriter logwriter, MessageId msgid)
@@ -181,7 +183,7 @@
     public SqlException(LogWriter logWriter, String reason, String sqlState,
         int errorCode)
     {
-        this(logWriter, null, reason, sqlState, errorCode);
+        this(logWriter, (Throwable)null, reason, sqlState, errorCode);
     }
 
     public SqlException(LogWriter logWriter, java.lang.Throwable throwable, 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java Thu Apr 13 15:59:22 2006
@@ -2244,7 +2244,7 @@
 
         // 3)Make sure JDBC ResultSet is positioned on insertRow
         if (!isOnInsertRow) {
-            throw newSQLException(SQLState.NOT_POSITIONED_ON_INSERT_ROW);
+            throw newSQLException(SQLState.CURSOR_NOT_POSITIONED_ON_INSERT_ROW);
         }
 
         // 4)Make sure underneath language resultset is not closed

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=393967&r1=393966&r2=393967&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 13 15:59:22 2006
@@ -1133,13 +1133,11 @@
 XJ079.S=The length specified ''{0}'' exceeds the size of the BLOB/BLOB.
 XJ080.S=USING execute statement passed {0} parameters rather than {1}.
 XJ081.S=Invalid value ''{0}'' passed as parameter ''{1}'' to method ''{2}''
-
 XJ082.U=BLOB/CLOB values are not allowed as method parameters or receiver.
 XJ083.U=''{0}'' not allowed because the ResultSet is not an updatable ResultSet. 
 XJ084.U=Column does not correspond to a column in the base table. Cannot issue ''{0}'' on this column.
 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}.
+XJ086.S=This method cannot be invoked while the cursor is not on the insert row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
 
 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.
@@ -1153,7 +1151,9 @@
 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
+XJ100.S=The scale supplied by the registerOutParameter method does not match with the setter method. Possible loss of precision!"
+XJ102.S=Can not perform an insert at the current position.
+XJ103.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 
@@ -1163,11 +1163,24 @@
 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}
-XJ120.S=Unable to unwrap for ''{0}''
+XJ114.S=Invalid cursor name ''{0}''
+XJ115.S=Unable to open resultSet with requested holdability {0}.
+XJ116.S=No more than {0} commands may be added to a single batch.
+XJ117.S=Batching of queries not allowed by J2EE compliance.
+XJ118.S=Query batch requested on a non-query statement.
+XJ120.S=This method cannot be invoked while the cursor is on the insert row, if the cursor is not on a valid row, or if this ResultSet object has a concurrency of CONCUR_READ_ONLY.
+XJ121.S=Invalid operation at current cursor position.
+XJ122.S=No updateXXX methods were called on this row.
+XJ123.S=This method must be called to update values in the current row or the insert row.
+XJ124.S=Column not updatable.
+XJ125.S=This method should only be called on ResultSet objects that are scrollable (type TYPE_SCROLL_SENSITIVE or TYPE_SCROLL_INSENSITIVE).
+XJ126.S=This method should not be called on sensitive dynamic cursors.
+XJ128.S=Unable to unwrap for ''{0}''
 
 0A000.S=Feature not implemented: {0}.
 0A000.S.1=JDBC method is not yet implemented.
 0A000.S.2=JDBC method {0} is not supported by the server. Please upgrade the server.
+
 
 XJ004.C=Database ''{0}'' not found.
 A020=Invalid authentication.

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/i18n/MessageUtil.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/i18n/MessageUtil.java?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/i18n/MessageUtil.java (original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/i18n/MessageUtil.java Thu Apr 13 15:59:22 2006
@@ -232,7 +232,7 @@
                     int numExpected = countParams(message);
                     SanityManager.ASSERT(numExpected == arguments.length,
                         "Number of parameters expected for message id " +
-                        messageId + "(" + numExpected +
+                        messageId + " (" + numExpected +
                         ") does not match number of arguments received (" +
                         arguments.length + ")");
                 }

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=393967&r1=393966&r2=393967&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 13 15:59:22 2006
@@ -150,7 +150,6 @@
 	*/
 	String SERVICE_STARTUP_EXCEPTION			= "XBM01.D";
 	String SERVICE_MISSING_IMPLEMENTATION		= "XBM02.D";
-	String SERVICE_MISSING_SOURCE_IMPLEMENTATION= "XBM03.D";
 	String SERVICE_MISSING_TARGET_IMPLEMENTATION= "XBM04.D";
 	String MISSING_PRODUCT_VERSION				= "XBM05.D";
 	String SERVICE_WRONG_BOOT_PASSWORD			= "XBM06.D";
@@ -410,7 +409,6 @@
 	*/
 	String SFE_CANT_RESTORE_INVALID_STORED_FORM                 = "XBAEA.S";
 	String SFE_FAIL_IO_EXCEPTION                                = "XBAEB.S";
-	String SFE_UNABLE_TO_FIND_CLASS_EXC_NO_NAME                 = "XBAED.S";
 
 	/*
 	** RawStore - Transactions.Basic statement exceptions
@@ -668,7 +666,6 @@
 	String LANG_CONCAT_STRING_OVERFLOW                                      = "54006";
 	String LANG_OUTSIDE_RANGE_FOR_DATATYPE                             = "22003";
 
-	String LANG_DB2_GETXXX_BAD_COLUMN_TYPE                             = "22005"; // same 22005 error
 	String LANG_DATA_TYPE_GET_MISMATCH                                 = "22005"; // same 22005 error
     String UNSUPPORTED_ENCODING                                        = "22005.S.1";
     String CHARACTER_CONVERTER_NOT_AVAILABLE                           = "22005.S.2";
@@ -813,7 +810,6 @@
 	//42X67
 	String LANG_NO_FIELD_FOUND                                         = "42X68";
 	String LANG_PRIMITIVE_REFERENCING_EXPRESSION                       = "42X69";
-	String LANG_DUPLICATE_PARAMETER_NAME                               = "42X70";
 	String LANG_UNKNOWN_NAMED_PARAMETER                                = "42X71";
 	String LANG_NO_STATIC_FIELD_FOUND                                  = "42X72";
 	String LANG_AMBIGUOUS_METHOD_INVOCATION                            = "42X73";
@@ -911,7 +907,6 @@
 	String LANG_NO_BEST_PLAN_FOUND                                     = "42Y69";
 	String LANG_ILLEGAL_FORCED_JOIN_ORDER                              = "42Y70";
 	String LANG_CANNOT_DROP_SYSTEM_ALIASES                             = "42Y71";
-	String LANG_INVALID_PROPERTY_VALUE                                 = "42Y81";
 	String LANG_CANNOT_DROP_TRIGGER_S_P_S                              = "42Y82";
 	String LANG_USER_AGGREGATE_BAD_TYPE_NULL                           = "42Y83";
 	String LANG_INVALID_DEFAULT_DEFINITION                             = "42Y84";
@@ -1202,8 +1197,6 @@
 	String LANG_CANT_DROP_JAR_ON_DB_CLASS_PATH_DURING_EXECUTION        = "X0X07.S";
 	String LANG_NO_USER_DDL_IN_SYSTEM_SCHEMA_DURING_EXECUTION          = "X0X09.S";
 	String LANG_REFRESH_ONLY_PROPERTY                                  = "X0X0A.S";
-	String LANG_CANT_READ_FAILED_TRANSACTION                           = "X0X0B.S";
-	String LANG_WORK_UNIT_NOT_SUBSCRIBED                               = "X0X0C.S";
 	String LANG_WORK_UNIT_ONLY                                         = "X0X0D.S";
 	String LANG_USING_CARDINALITY_VIOLATION_DURING_EXECUTION           = "X0X10.S";
 	String LANG_NO_ROWS_FROM_USING_DURING_EXECUTION                    = "X0X11.S";
@@ -1414,8 +1407,6 @@
     String UNSUPPORTED_TYPE = "XJ021.S";
     String SET_STREAM_FAILURE = "XJ022.S";
     String SET_STREAM_INEXACT_LENGTH_DATA = "XJ023.S";
-    String STREAM_EOF = "XJ085.S";
-    String SET_UNICODE_INVALID_LENGTH = "XJ024.S";
     String NEGATIVE_STREAM_LENGTH = "XJ025.S";
     String NO_AUTO_COMMIT_ON = "XJ030.S";
     String BAD_PROPERTY_VALUE = "XJ042.S";
@@ -1428,7 +1419,6 @@
     String CANNOT_COMMIT_XA = "XJ057.S";
     String CANNOT_ROLLBACK_XA = "XJ058.S";
     String CANNOT_CLOSE_ACTIVE_XA_CONNECTION = "XJ059.S";
-    String SET_ISO_LEVEL_ON_GLOBAL_TRANSACTION = "XJ05A.S";
 	String CANNOT_HOLD_CURSOR_XA = "XJ05C.S";
     String NOT_ON_FORWARD_ONLY_CURSOR = "XJ061.S";
     String INVALID_FETCH_SIZE = "XJ062.S";
@@ -1439,31 +1429,22 @@
     String NULL_SQL_TEXT = "XJ067.S";
     String MIDDLE_OF_BATCH = "XJ068.S";
     String NO_SETXXX_FOR_EXEC_USING = "XJ069.S";
-    String INVALID_QUERYTIMEOUT_VALUE = "XJ074.S";
-    String LANG_NUM_PARAMS_INCORRECT = "XJ080.S";
-    String INVALID_API_PARAMETER = "XJ081.S";
-    String INTERNAL_ERROR = "XJ999.S";
-    String CONN_GENERIC = "X0RQB.S";
-    String CONN_REMOTE_ERROR = "X0RQC.S";
-
-    // Blob/Clob
     String BLOB_BAD_POSITION = "XJ070.S";
     String BLOB_NONPOSITIVE_LENGTH = "XJ071.S";
     String BLOB_NULL_PATTERN_OR_SEARCH_STR = "XJ072.S";
     String BLOB_ACCESSED_AFTER_COMMIT = "XJ073.S";
+    String INVALID_QUERYTIMEOUT_VALUE = "XJ074.S";
     String BLOB_POSITION_TOO_LARGE = "XJ076.S";
     String BLOB_UNABLE_TO_READ_PATTERN = "XJ077.S";
     String BLOB_INVALID_OFFSET = "XJ078.S";
     String BLOB_LENGTH_TOO_LONG = "XJ079.S";
-
+    String LANG_NUM_PARAMS_INCORRECT = "XJ080.S";
+    String INVALID_API_PARAMETER = "XJ081.S";
     String LOB_AS_METHOD_ARGUMENT_OR_RECEIVER = "XJ082.U";
-    // the following exception is internal and is never seen by the user
-    // (no message in message.properties)
-
-    //updatable resultset related
     String UPDATABLE_RESULTSET_API_DISALLOWED = "XJ083.U";
     String COLUMN_NOT_FROM_BASE_TABLE = "XJ084.U";
-    String NOT_POSITIONED_ON_INSERT_ROW = "XJ086.S";
+    String STREAM_EOF = "XJ085.S";
+    String CURSOR_NOT_POSITIONED_ON_INSERT_ROW = "XJ086.S";
     
     
     String WASNULL_INVALID = "XJ088.S";
@@ -1478,7 +1459,8 @@
     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 REGOUTPARAM_SCALE_DOESNT_MATCH_SETTER = "XJ100.S";
+    String TABLE_NAME_CANNOT_BE_NULL = "XJ103.S";
     String SHARED_KEY_LENGTH_ERROR = "XJ104.S";
     String DES_KEY_HAS_WRONG_LENGTH = "XJ105.S";
     String CRYPTO_NO_SUCH_PADDING = "XJ106.S";
@@ -1488,8 +1470,23 @@
     String FOREIGN_TABLE_NAME_IS_NULL = "XJ111.S";
     String SECURITY_EXCEPTION_ENCOUNTERED = "XJ112.S";    
     String UNABLE_TO_OPEN_FILE = "XJ113.S";
+    String CURSOR_INVALID_CURSOR_NAME = "XJ114.S";
+    String UNABLE_TO_OPEN_RESULTSET_WITH_REQUESTED_HOLDABILTY = "XJ115.S";
+    String TOO_MANY_COMMANDS_FOR_BATCH = "XJ116.S";
+    String CANNOT_BATCH_QUERIES = "XJ117.S";
+    String QUERY_BATCH_ON_NON_QUERY_STATEMENT = "XJ118.S";
+    String CURSOR_CANNOT_INVOKE_ON_INSROW_OR_INVALIDROW_OR_READONLY = "XJ120.S";
+    String CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION = "XJ121.S";
+    String CURSOR_NO_UPDATE_CALLS_ON_CURRENT_ROW = "XJ122.S";
+    String CURSOR_NOT_ON_CURRENT_OR_INSERT_ROW = "XJ123.S";
+    String CURSOR_COLUMN_NOT_UPDATABLE = "XJ124.S";
+    String CURSOR_MUST_BE_SCROLLABLE = "XJ125.S";
+    String CURSOR_INVALID_FOR_SENSITIVE_DYNAMIC = "XJ126.S";
     //wrapper related
-    String UNABLE_TO_UNWRAP = "XJ120.S";
+    String UNABLE_TO_UNWRAP = "XJ128.S";
+
+    String INTERNAL_ERROR = "XJ999.S";
+    String CONN_GENERIC = "X0RQB.S";
 
     //following are session severity.
     String DATABASE_NOT_FOUND = "XJ004.C";
@@ -1552,7 +1549,7 @@
     String JAVA_EXCEPTION = "XJ001.U";
     String UNSERIALIZABLE_CONNECTION = "XJ038.U";
     String NO_UPGRADE = "XJ050.U";
-    
+        
     /*
      ** Messages whose SQL states are proscribed by DRDA
      */

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/LOBTest.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/LOBTest.out?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/LOBTest.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/LOBTest.out Thu Apr 13 15:59:22 2006
@@ -2761,7 +2761,7 @@
 === Columntype int
 select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from clob_table
 	0 getObject            ->		EXCEPTION (null)
-	0 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	0 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	0 getAsciiStream       ->		EXCEPTION (null)
 	0 getBigDecimal        ->		EXCEPTION (null)
 	0 getBinaryStream      ->		EXCEPTION (null)
@@ -2776,7 +2776,7 @@
 	0 getFloat             ->'0.0'    	: java.lang.Float
 	0 getInt               ->'0'    	: java.lang.Integer
 	0 getLong              ->'0'    	: java.lang.Long
-	0 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	0 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	0 getShort             ->'0'    	: java.lang.Short
 	0 getString            ->		EXCEPTION (null)
 	0 getTime              ->		EXCEPTION (null)
@@ -2807,7 +2807,7 @@
 === Columntype varchar(80)
 select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from clob_table
 	2 getObject            ->		EXCEPTION (null)
-	2 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	2 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	2 getAsciiStream       ->		EXCEPTION (null)
 	2 getBigDecimal        ->		EXCEPTION (null)
 	2 getBinaryStream      ->		EXCEPTION (null)
@@ -2822,7 +2822,7 @@
 	2 getFloat             ->'0.0'    	: java.lang.Float
 	2 getInt               ->'0'    	: java.lang.Integer
 	2 getLong              ->'0'    	: java.lang.Long
-	2 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	2 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	2 getShort             ->'0'    	: java.lang.Short
 	2 getString            ->		EXCEPTION (null)
 	2 getTime              ->		EXCEPTION (null)
@@ -2830,7 +2830,7 @@
 === Columntype long varchar
 select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from clob_table
 	3 getObject            ->		EXCEPTION (null)
-	3 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	3 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	3 getAsciiStream       ->		EXCEPTION (null)
 	3 getBigDecimal        ->		EXCEPTION (null)
 	3 getBinaryStream      ->		EXCEPTION (null)
@@ -2845,7 +2845,7 @@
 	3 getFloat             ->'0.0'    	: java.lang.Float
 	3 getInt               ->'0'    	: java.lang.Integer
 	3 getLong              ->'0'    	: java.lang.Long
-	3 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	3 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	3 getShort             ->'0'    	: java.lang.Short
 	3 getString            ->		EXCEPTION (null)
 	3 getTime              ->		EXCEPTION (null)
@@ -2853,7 +2853,7 @@
 === Columntype char(10) for bit data
 select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from clob_table
 	4 getObject            ->		EXCEPTION (null)
-	4 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	4 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	4 getAsciiStream       ->		EXCEPTION (null)
 	4 getBigDecimal        ->		EXCEPTION (null)
 	4 getBinaryStream      ->		EXCEPTION (null)
@@ -2868,7 +2868,7 @@
 	4 getFloat             ->'0.0'    	: java.lang.Float
 	4 getInt               ->'0'    	: java.lang.Integer
 	4 getLong              ->'0'    	: java.lang.Long
-	4 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	4 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	4 getShort             ->'0'    	: java.lang.Short
 	4 getString            ->		EXCEPTION (null)
 	4 getTime              ->		EXCEPTION (null)
@@ -2876,7 +2876,7 @@
 === Columntype long varchar for bit data
 select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from clob_table
 	5 getObject            ->		EXCEPTION (null)
-	5 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	5 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	5 getAsciiStream       ->		EXCEPTION (null)
 	5 getBigDecimal        ->		EXCEPTION (null)
 	5 getBinaryStream      ->		EXCEPTION (null)
@@ -2891,7 +2891,7 @@
 	5 getFloat             ->'0.0'    	: java.lang.Float
 	5 getInt               ->'0'    	: java.lang.Integer
 	5 getLong              ->'0'    	: java.lang.Long
-	5 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	5 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	5 getShort             ->'0'    	: java.lang.Short
 	5 getString            ->		EXCEPTION (null)
 	5 getTime              ->		EXCEPTION (null)
@@ -2899,7 +2899,7 @@
 === Columntype blob(80)
 select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from clob_table
 	6 getObject            ->		EXCEPTION (null)
-	6 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	6 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	6 getAsciiStream       ->		EXCEPTION (null)
 	6 getBigDecimal        ->		EXCEPTION (null)
 	6 getBinaryStream      ->		EXCEPTION (null)
@@ -2914,7 +2914,7 @@
 	6 getFloat             ->'0.0'    	: java.lang.Float
 	6 getInt               ->'0'    	: java.lang.Integer
 	6 getLong              ->'0'    	: java.lang.Long
-	6 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	6 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	6 getShort             ->'0'    	: java.lang.Short
 	6 getString            ->		EXCEPTION (null)
 	6 getTime              ->		EXCEPTION (null)
@@ -2922,7 +2922,7 @@
 === Columntype clob (2 K)
 select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from clob_table
 	7 getObject            ->		EXCEPTION (null)
-	7 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	7 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	7 getAsciiStream       ->		EXCEPTION (null)
 	7 getBigDecimal        ->		EXCEPTION (null)
 	7 getBinaryStream      ->		EXCEPTION (null)
@@ -2937,7 +2937,7 @@
 	7 getFloat             ->'0.0'    	: java.lang.Float
 	7 getInt               ->'0'    	: java.lang.Integer
 	7 getLong              ->'0'    	: java.lang.Long
-	7 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	7 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	7 getShort             ->'0'    	: java.lang.Short
 	7 getString            ->		EXCEPTION (null)
 	7 getTime              ->		EXCEPTION (null)
@@ -3314,7 +3314,7 @@
 === Columntype int
 select col_0 as col_0_1, col_0 as col_0_2, col_0 as col_0_3, col_0 as col_0_4, col_0 as col_0_5, col_0 as col_0_6, col_0 as col_0_7, col_0 as col_0_8, col_0 as col_0_9, col_0 as col_0_10, col_0 as col_0_11, col_0 as col_0_12, col_0 as col_0_13, col_0 as col_0_14, col_0 as col_0_15, col_0 as col_0_16, col_0 as col_0_17, col_0 as col_0_18, col_0 as col_0_19, col_0 as col_0_20, col_0 as col_0_21 from clob_table
 	0 getObject            ->		EXCEPTION (null)
-	0 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	0 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	0 getAsciiStream       ->		EXCEPTION (null)
 	0 getBigDecimal        ->		EXCEPTION (null)
 	0 getBinaryStream      ->		EXCEPTION (null)
@@ -3329,7 +3329,7 @@
 	0 getFloat             ->'0.0'    	: java.lang.Float
 	0 getInt               ->'0'    	: java.lang.Integer
 	0 getLong              ->'0'    	: java.lang.Long
-	0 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	0 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	0 getShort             ->'0'    	: java.lang.Short
 	0 getString            ->		EXCEPTION (null)
 	0 getTime              ->		EXCEPTION (null)
@@ -3360,7 +3360,7 @@
 === Columntype varchar(80)
 select col_2 as col_2_1, col_2 as col_2_2, col_2 as col_2_3, col_2 as col_2_4, col_2 as col_2_5, col_2 as col_2_6, col_2 as col_2_7, col_2 as col_2_8, col_2 as col_2_9, col_2 as col_2_10, col_2 as col_2_11, col_2 as col_2_12, col_2 as col_2_13, col_2 as col_2_14, col_2 as col_2_15, col_2 as col_2_16, col_2 as col_2_17, col_2 as col_2_18, col_2 as col_2_19, col_2 as col_2_20, col_2 as col_2_21 from clob_table
 	2 getObject            ->		EXCEPTION (null)
-	2 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	2 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	2 getAsciiStream       ->		EXCEPTION (null)
 	2 getBigDecimal        ->		EXCEPTION (null)
 	2 getBinaryStream      ->		EXCEPTION (null)
@@ -3375,7 +3375,7 @@
 	2 getFloat             ->'0.0'    	: java.lang.Float
 	2 getInt               ->'0'    	: java.lang.Integer
 	2 getLong              ->'0'    	: java.lang.Long
-	2 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	2 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	2 getShort             ->'0'    	: java.lang.Short
 	2 getString            ->		EXCEPTION (null)
 	2 getTime              ->		EXCEPTION (null)
@@ -3383,7 +3383,7 @@
 === Columntype long varchar
 select col_3 as col_3_1, col_3 as col_3_2, col_3 as col_3_3, col_3 as col_3_4, col_3 as col_3_5, col_3 as col_3_6, col_3 as col_3_7, col_3 as col_3_8, col_3 as col_3_9, col_3 as col_3_10, col_3 as col_3_11, col_3 as col_3_12, col_3 as col_3_13, col_3 as col_3_14, col_3 as col_3_15, col_3 as col_3_16, col_3 as col_3_17, col_3 as col_3_18, col_3 as col_3_19, col_3 as col_3_20, col_3 as col_3_21 from clob_table
 	3 getObject            ->		EXCEPTION (null)
-	3 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	3 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	3 getAsciiStream       ->		EXCEPTION (null)
 	3 getBigDecimal        ->		EXCEPTION (null)
 	3 getBinaryStream      ->		EXCEPTION (null)
@@ -3398,7 +3398,7 @@
 	3 getFloat             ->'0.0'    	: java.lang.Float
 	3 getInt               ->'0'    	: java.lang.Integer
 	3 getLong              ->'0'    	: java.lang.Long
-	3 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	3 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	3 getShort             ->'0'    	: java.lang.Short
 	3 getString            ->		EXCEPTION (null)
 	3 getTime              ->		EXCEPTION (null)
@@ -3406,7 +3406,7 @@
 === Columntype char(10) for bit data
 select col_4 as col_4_1, col_4 as col_4_2, col_4 as col_4_3, col_4 as col_4_4, col_4 as col_4_5, col_4 as col_4_6, col_4 as col_4_7, col_4 as col_4_8, col_4 as col_4_9, col_4 as col_4_10, col_4 as col_4_11, col_4 as col_4_12, col_4 as col_4_13, col_4 as col_4_14, col_4 as col_4_15, col_4 as col_4_16, col_4 as col_4_17, col_4 as col_4_18, col_4 as col_4_19, col_4 as col_4_20, col_4 as col_4_21 from clob_table
 	4 getObject            ->		EXCEPTION (null)
-	4 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	4 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	4 getAsciiStream       ->		EXCEPTION (null)
 	4 getBigDecimal        ->		EXCEPTION (null)
 	4 getBinaryStream      ->		EXCEPTION (null)
@@ -3421,7 +3421,7 @@
 	4 getFloat             ->'0.0'    	: java.lang.Float
 	4 getInt               ->'0'    	: java.lang.Integer
 	4 getLong              ->'0'    	: java.lang.Long
-	4 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	4 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	4 getShort             ->'0'    	: java.lang.Short
 	4 getString            ->		EXCEPTION (null)
 	4 getTime              ->		EXCEPTION (null)
@@ -3429,7 +3429,7 @@
 === Columntype long varchar for bit data
 select col_5 as col_5_1, col_5 as col_5_2, col_5 as col_5_3, col_5 as col_5_4, col_5 as col_5_5, col_5 as col_5_6, col_5 as col_5_7, col_5 as col_5_8, col_5 as col_5_9, col_5 as col_5_10, col_5 as col_5_11, col_5 as col_5_12, col_5 as col_5_13, col_5 as col_5_14, col_5 as col_5_15, col_5 as col_5_16, col_5 as col_5_17, col_5 as col_5_18, col_5 as col_5_19, col_5 as col_5_20, col_5 as col_5_21 from clob_table
 	5 getObject            ->		EXCEPTION (null)
-	5 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	5 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	5 getAsciiStream       ->		EXCEPTION (null)
 	5 getBigDecimal        ->		EXCEPTION (null)
 	5 getBinaryStream      ->		EXCEPTION (null)
@@ -3444,7 +3444,7 @@
 	5 getFloat             ->'0.0'    	: java.lang.Float
 	5 getInt               ->'0'    	: java.lang.Integer
 	5 getLong              ->'0'    	: java.lang.Long
-	5 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	5 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	5 getShort             ->'0'    	: java.lang.Short
 	5 getString            ->		EXCEPTION (null)
 	5 getTime              ->		EXCEPTION (null)
@@ -3452,7 +3452,7 @@
 === Columntype blob(80)
 select col_6 as col_6_1, col_6 as col_6_2, col_6 as col_6_3, col_6 as col_6_4, col_6 as col_6_5, col_6 as col_6_6, col_6 as col_6_7, col_6 as col_6_8, col_6 as col_6_9, col_6 as col_6_10, col_6 as col_6_11, col_6 as col_6_12, col_6 as col_6_13, col_6 as col_6_14, col_6 as col_6_15, col_6 as col_6_16, col_6 as col_6_17, col_6 as col_6_18, col_6 as col_6_19, col_6 as col_6_20, col_6 as col_6_21 from clob_table
 	6 getObject            ->		EXCEPTION (null)
-	6 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	6 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	6 getAsciiStream       ->		EXCEPTION (null)
 	6 getBigDecimal        ->		EXCEPTION (null)
 	6 getBinaryStream      ->		EXCEPTION (null)
@@ -3467,7 +3467,7 @@
 	6 getFloat             ->'0.0'    	: java.lang.Float
 	6 getInt               ->'0'    	: java.lang.Integer
 	6 getLong              ->'0'    	: java.lang.Long
-	6 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	6 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	6 getShort             ->'0'    	: java.lang.Short
 	6 getString            ->		EXCEPTION (null)
 	6 getTime              ->		EXCEPTION (null)
@@ -3475,7 +3475,7 @@
 === Columntype clob (64  )
 select typecol as typecol_1, typecol as typecol_2, typecol as typecol_3, typecol as typecol_4, typecol as typecol_5, typecol as typecol_6, typecol as typecol_7, typecol as typecol_8, typecol as typecol_9, typecol as typecol_10, typecol as typecol_11, typecol as typecol_12, typecol as typecol_13, typecol as typecol_14, typecol as typecol_15, typecol as typecol_16, typecol as typecol_17, typecol as typecol_18, typecol as typecol_19, typecol as typecol_20, typecol as typecol_21 from clob_table
 	7 getObject            ->		EXCEPTION (null)
-	7 getArray             ->		EXCEPTION (jdbc 2 method not yet implemented)
+	7 getArray             ->		EXCEPTION (JDBC method is not yet implemented.)
 	7 getAsciiStream       ->		EXCEPTION (null)
 	7 getBigDecimal        ->		EXCEPTION (null)
 	7 getBinaryStream      ->		EXCEPTION (null)
@@ -3490,7 +3490,7 @@
 	7 getFloat             ->'0.0'    	: java.lang.Float
 	7 getInt               ->'0'    	: java.lang.Integer
 	7 getLong              ->'0'    	: java.lang.Long
-	7 getRef               ->		EXCEPTION (jdbc 2 method not yet implemented)
+	7 getRef               ->		EXCEPTION (JDBC method is not yet implemented.)
 	7 getShort             ->'0'    	: java.lang.Short
 	7 getString            ->		EXCEPTION (null)
 	7 getTime              ->		EXCEPTION (null)

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out Thu Apr 13 15:59:22 2006
@@ -32,9 +32,9 @@
 ij> -- now try the fetch on cursors again after commit
 ----- cursors jdk1 and jdk2 will give errors
 next jdk1;
-ERROR (no SQLState): Invalid operation: result set closed
+ERROR XJ012: 'ResultSet' already closed.
 ij> next jdk2;
-ERROR (no SQLState): Invalid operation: result set closed
+ERROR XJ012: 'ResultSet' already closed.
 ij> next jdk4;
 C11 |C12        
 -----
@@ -72,11 +72,11 @@
 ij> -- now try the fetch on cursors again after rollback
 ----- all the cursors will give errors
 next jdk1;
-ERROR (no SQLState): Invalid operation: result set closed
+ERROR XJ012: 'ResultSet' already closed.
 ij> next jdk2;
-ERROR (no SQLState): Invalid operation: result set closed
+ERROR XJ012: 'ResultSet' already closed.
 ij> next jdk4;
-ERROR (no SQLState): Invalid operation: result set closed
+ERROR XJ012: 'ResultSet' already closed.
 ij> -- clean up.
 close jdk1;
 ij> close jdk2;
@@ -94,16 +94,16 @@
 -----
 1 |1          
 ij> -- wont' be able to drop table because of cursors jdk1 and jdk4
--- in DerbyNetClient, cursor is closed on server and DROP TABLE succeeds
+----- in DerbyNetClient, cursor is closed on server and DROP TABLE succeeds
 drop table t1;
 0 rows inserted/updated/deleted
 ij> commit;
 ij> -- drop table still won't work because jdk4 is still open after commit
--- in DerbyNetClient, the table is already dropped
+----- in DerbyNetClient, the table is already dropped
 drop table t1;
 ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist.
 ij> -- close cursor jdk4 and try then deleting the table
--- in DerbyNetClient, the table is already dropped
+----- in DerbyNetClient, the table is already dropped
 close jdk4;
 ij> drop table t1;
 ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist.
@@ -129,12 +129,12 @@
 -----
 1 |1          
 ij> -- try to change the isolation level. will give error because of jdk1 and jdk4
--- no error in DerbyNetClient because cursor is closed on server
+----- no error in DerbyNetClient because cursor is closed on server
 set current isolation RR;
 0 rows inserted/updated/deleted
 ij> commit;
 ij> -- attempt to change isolation level should give error because of jdk4 hold cursor
--- no error in DerbyNetClient because cursor is closed on server
+----- no error in DerbyNetClient because cursor is closed on server
 set isolation = REPEATABLE READ;
 0 rows inserted/updated/deleted
 ij> -- close jdk4 and then should be able to change isolation
@@ -156,11 +156,11 @@
 -----
 1 |1          
 ij> -- following should fail because of cursor jdk4
--- no error in DerbyNetClient because cursor is closed on server
+----- no error in DerbyNetClient because cursor is closed on server
 set isolation RS;
 0 rows inserted/updated/deleted
 ij> -- following should fail because of cursor jdk4
--- no error in DerbyNetClient because cursor is closed on server
+----- no error in DerbyNetClient because cursor is closed on server
 set isolation UR;
 0 rows inserted/updated/deleted
 ij> close jdk4;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorJava.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorJava.out?rev=393967&r1=393966&r2=393967&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorJava.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorJava.out Thu Apr 13 15:59:22 2006
@@ -9,7 +9,7 @@
 checkResultSet before commit
 21, testtable2-one
 checkResultSet after commit
-EXPECTED EXCEPTION:Invalid operation: result set closed
+EXPECTED EXCEPTION:'ResultSet' already closed.
 testStatementsInProcedure()
 checkResultSet before commit
 11, testtable1-one
@@ -28,7 +28,7 @@
 checkResultSet before commit
 21, testtable2-one
 checkResultSet after commit
-EXPECTED EXCEPTION:Invalid operation: result set closed
+EXPECTED EXCEPTION:'ResultSet' already closed.
 testStatementsInProcedure()
 checkResultSet before commit
 11, testtable1-one



Mime
View raw message