db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r408971 - in /db/derby/code/trunk: java/build/org/apache/derbyBuild/ java/client/org/apache/derby/client/net/ java/engine/org/apache/derby/loc/ java/shared/org/apache/derby/shared/common/reference/ java/testing/org/apache/derbyTesting/funct...
Date Tue, 23 May 2006 17:40:15 GMT
Author: davidvc
Date: Tue May 23 10:40:14 2006
New Revision: 408971

URL: http://svn.apache.org/viewvc?rev=408971&view=rev
Log:
DERBY-848: Internationalize NetSqldta to OpenSocketAction in 
org.apache.derby.client.net.

Passes derbynetclientmats on JDK 1.4/Solaris and jdbc40 on JDK1.6/Solaris


Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.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/MessageId.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/parameterMapping.out
    db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed
    db/derby/code/trunk/tools/testing/i18nTestGenerator/generateClientMessageTest.sh

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java?rev=408971&r1=408970&r2=408971&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 Tue May 23 10:40:14
2006
@@ -105,6 +105,14 @@
         clientMessageIds.add(SQLState.DRDA_COMMAND_NOT_IMPLEMENTED);
         clientMessageIds.add(SQLState.JDBC_DRIVER_REGISTER);
         clientMessageIds.add(SQLState.NO_CURRENT_ROW);
+        clientMessageIds.add(SQLState.PROPERTY_UNSUPPORTED_CHANGE);
+        clientMessageIds.add(SQLState.NET_INVALID_JDBC_TYPE_FOR_PARAM);
+        clientMessageIds.add(SQLState.UNRECOGNIZED_JAVA_SQL_TYPE);
+        clientMessageIds.add(SQLState.NET_UNRECOGNIZED_JDBC_TYPE);
+        clientMessageIds.add(SQLState.NET_SQLCDTA_INVALID_FOR_RDBCOLID);
+        clientMessageIds.add(SQLState.NET_SQLCDTA_INVALID_FOR_PKGID);
+        clientMessageIds.add(SQLState.NET_PGNAMCSN_INVALID_AT_SQLAM);
+        clientMessageIds.add(SQLState.NET_VCM_VCS_LENGTHS_INVALID);
     }
 
 	public static void main(String[] args) throws Exception {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java?rev=408971&r1=408970&r2=408971&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java Tue
May 23 10:40:14 2006
@@ -33,7 +33,11 @@
 import org.apache.derby.client.am.Utils;
 import org.apache.derby.jdbc.ClientDriver;
 import org.apache.derby.client.am.ClientJDBCObjectFactory;
+import org.apache.derby.shared.common.i18n.MessageUtil;
 import org.apache.derby.shared.common.reference.JDBC30Translation;
+import org.apache.derby.client.am.ClientMessageId;
+import org.apache.derby.shared.common.reference.SQLState;
+import org.apache.derby.shared.common.reference.MessageId;
 
 public class NetStatementReply extends NetPackageReply implements StatementReplyInterface
{
     NetStatementReply(NetAgent netAgent, int bufferSize) {
@@ -1020,10 +1024,10 @@
 
         netAgent_.setSvrcod(svrcod);
         agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                "Execution failed due to a distribution protocol error that caused " +
-                "deallocation of the conversation.  " +
-                "An Open Query Command was issued for a query which was already open.",
-                SqlState._58009));
+            new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
+            MessageUtil.getCompleteMessage(MessageId.CONN_DRDA_QRYOPEN,
+                SqlException.CLIENT_MESSAGE_RESOURCE_NAME,
+                (Object [])null)));
     }
 
     // Open Query Failure (OPNQFLRM) Reply Message indicates that the
@@ -1393,10 +1397,10 @@
     // DSCERRCD_42 - RLO fails to reference a required GDA or RLO.
     private void descriptorErrorDetected() throws DisconnectException {
         agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                "Execution failed due to a distribution protocol error that caused " +
-                "deallocation of the conversation.  " +
-                "A PROTOCOL Invalid FDOCA Description Error was detected.",
-                SqlState._58009));
+            new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
+            MessageUtil.getCompleteMessage(MessageId.CONN_DRDA_INVALIDFDOCA,
+                SqlException.CLIENT_MESSAGE_RESOURCE_NAME,
+                (Object [])null)));
     }
 
     protected void parseQRYDTA(NetResultSet netResultSet) throws DisconnectException {
@@ -1480,7 +1484,8 @@
             netCursor.extdtaData_.add(data);
         } catch (java.lang.OutOfMemoryError e) {
             agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                    "Attempt to fully materialize lob data that is too large for the JVM.
 "));
+                new ClientMessageId(SQLState.NET_LOB_DATA_TOO_LARGE_FOR_JVM),
+                e));
         }
     }
 
@@ -1551,7 +1556,8 @@
             scldtaLen = peekFastLength();
             if (scldtaLen < 18 || scldtaLen > 255) {
                 agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                        "scldta length, " + scldtaLen + ", is invalid for rdbcolid"));
+                    new ClientMessageId(SQLState.NET_SQLCDTA_INVALID_FOR_RDBCOLID),
+                    new Integer(scldtaLen)));
                 return null;
             }
             // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes
@@ -1563,7 +1569,8 @@
             scldtaLen = peekFastLength();
             if (scldtaLen < 18 || scldtaLen > 255) {
                 agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                        "scldta length, " + scldtaLen + ", is invalid for pkgid"));
+                    new ClientMessageId(SQLState.NET_SQLCDTA_INVALID_FOR_PKGID),
+                    new Integer(scldtaLen)));
                 return null; // To make compiler happy.
             }
             // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes
@@ -1577,7 +1584,8 @@
 
         } else {
             agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                    "PKGNAMCSN length, " + ddmLength + ", is invalid at SQLAM " + netAgent_.targetSqlam_));
+                new ClientMessageId(SQLState.NET_PGNAMCSN_INVALID_AT_SQLAM),
+                new Integer(ddmLength), new Integer(netAgent_.targetSqlam_)));
             return null;  // To make compiler happy.
         }
 
@@ -2275,7 +2283,7 @@
         int vcs_length = readFastUnsignedShort();
         if (vcm_length > 0 && vcs_length > 0) {
             agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                    "only one of the VCM, VCS length can be greater than 0"));
+                new ClientMessageId(SQLState.NET_VCM_VCS_LENGTHS_INVALID)));
         } else if (vcs_length > 0) {
             stringToBeSet = readFastString(vcs_length, netAgent_.targetTypdef_.getCcsidSbcEncoding());
         }
@@ -2293,7 +2301,7 @@
         int vcs_length = readUnsignedShort();
         if (vcm_length > 0 && vcs_length > 0) {
             agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                    "only one of the VCM, VCS length can be greater than 0"));
+                new ClientMessageId(SQLState.NET_VCM_VCS_LENGTHS_INVALID)));
         } else if (vcs_length > 0) {
             stringToBeSet = readString(vcs_length, netAgent_.targetTypdef_.getCcsidSbcEncoding());
         }
@@ -2388,8 +2396,6 @@
         parseEXCSQLSETreply(statement);
         endOfSameIdChainData();
     }
-
-
 }
 
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java?rev=408971&r1=408970&r2=408971&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java Tue
May 23 10:40:14 2006
@@ -27,6 +27,8 @@
 import org.apache.derby.client.am.Section;
 import org.apache.derby.client.am.SqlException;
 import org.apache.derby.client.am.Types;
+import org.apache.derby.client.am.ClientMessageId;
+import org.apache.derby.shared.common.reference.SQLState;
 
 // For performance, should we worry about the ordering of our DDM command parameters
 
@@ -736,7 +738,9 @@
                             try {
                                 dataLength = ((java.sql.Clob) inputs[i]).length();
                             } catch (java.sql.SQLException e) {
-                                throw new SqlException(netAgent_.logWriter_, e, "Error obtaining
length of blob object, exception follows. ");
+                                throw new SqlException(netAgent_.logWriter_, 
+                                    new ClientMessageId(SQLState.NET_ERROR_GETTING_BLOB_LENGTH),
+                                    e);
                             }
                         } else {
                             dataLength = ((Clob) o).length();
@@ -750,7 +754,9 @@
                             try {
                                 dataLength = ((java.sql.Blob) inputs[i]).length();
                             } catch (java.sql.SQLException e) {
-                                throw new SqlException(netAgent_.logWriter_, e, "Error obtaining
length of blob object, exception follows. ");
+                                throw new SqlException(netAgent_.logWriter_, 
+                                    new ClientMessageId(SQLState.NET_ERROR_GETTING_BLOB_LENGTH),
+                                    e);
                             }
                         } else { // use promoted Blob
                             dataLength = ((Blob) o).length();
@@ -773,10 +779,10 @@
                         setFDODTALobLength(protocolTypesAndLengths, i, dataLength);
                         break;
                     default:
-                        throw new SqlException(netAgent_.logWriter_, "unrecognized jdbc type.
" +
-                                " type: " + protocolTypesAndLengths[i][0] +
-                                ", columnCount: " + numVars +
-                                ", columnIndex: " + i);
+                        throw new SqlException(netAgent_.logWriter_, 
+                            new ClientMessageId(SQLState.NET_UNRECOGNIZED_JDBC_TYPE),
+                               new Integer(protocolTypesAndLengths[i][0]),
+                               new Integer(numVars), new Integer(i));
                     }
                 }
             }
@@ -840,7 +846,9 @@
                                         writeNullByte,
                                         index + 1);
                             } catch (java.sql.SQLException e) {
-                                throw new SqlException(netAgent_.logWriter_, e, "Error obtaining
length of blob object, exception follows. ");
+                                throw new SqlException(netAgent_.logWriter_, 
+                                    new ClientMessageId(SQLState.NET_ERROR_GETTING_BLOB_LENGTH),
+                                    e);
                             }
                         } else if (((Blob) b).isBinaryStream()) {
                             writeScalarStream(chainFlag,
@@ -885,7 +893,9 @@
                                         writeNullByte,
                                         index + 1);
                             } catch (java.sql.SQLException e) {
-                                throw new SqlException(netAgent_.logWriter_, e, "Error obtaining
length of blob object, exception follows. ");
+                                throw new SqlException(netAgent_.logWriter_, 
+                                    new ClientMessageId(SQLState.NET_ERROR_GETTING_BLOB_LENGTH),
+                                    e);
                             }
                         } else if (((Clob) c).isCharacterStream()) {
                             writeScalarStream(chainFlag,
@@ -988,7 +998,9 @@
                 // exception is thrown.
 
                 if (jdbcType == 0) {
-                    throw new SqlException(netAgent_.logWriter_, "Invalid JDBC Type for parameter
" + i);
+                    throw new SqlException(netAgent_.logWriter_, 
+                        new ClientMessageId(SQLState.NET_INVALID_JDBC_TYPE_FOR_PARAM),
+                        new Integer(i));
                 }
 
                 switch (jdbcType) {
@@ -1019,7 +1031,9 @@
                             lidAndLengths[i][0] = DRDAConstants.DRDA_TYPE_NLOBCMIXED;
                             lidAndLengths[i][1] = buildPlaceholderLength(c.length());
                         } catch (java.io.UnsupportedEncodingException e) {
-                            throw new SqlException(netAgent_.logWriter_, e, "Error in building
String parameter: throwable attached");
+                            throw new SqlException(netAgent_.logWriter_, 
+                                new ClientMessageId(SQLState.UNSUPPORTED_ENCODING),
+                                "byte array", "Clob", e);
                         }
                     }
                     break;
@@ -1136,7 +1150,9 @@
                             lidAndLengths[i][0] = DRDAConstants.DRDA_TYPE_NLOBCMIXED;
                             lidAndLengths[i][1] = buildPlaceholderLength(c.length());
                         } catch (java.io.UnsupportedEncodingException e) {
-                            throw new SqlException(netAgent_.logWriter_, e, "Error in building
String parameter: throwable attached");
+                            throw new SqlException(netAgent_.logWriter_, 
+                                new ClientMessageId(SQLState.UNSUPPORTED_ENCODING),
+                                "byte array", "Clob");
                         }
                     }
                     break;
@@ -1194,7 +1210,8 @@
                         try {
                             lidAndLengths[i][1] = buildPlaceholderLength(b.length());
                         } catch (java.sql.SQLException e) {
-                            throw new SqlException(netAgent_.logWriter_, e, "Error obtaining
length of blob object, exception follows. ");
+                            throw new SqlException(netAgent_.logWriter_, 
+                                new ClientMessageId(SQLState.NET_ERROR_GETTING_BLOB_LENGTH),
e);
                         }
                     }
                     break;
@@ -1210,7 +1227,9 @@
                             try {
                                 lobLength = c.length();
                             } catch (java.sql.SQLException e) {
-                                throw new SqlException(netAgent_.logWriter_, e, "Error obtaining
length of clob object, exception follows. ");
+                                throw new SqlException(netAgent_.logWriter_, 
+                                    new ClientMessageId(SQLState.NET_ERROR_GETTING_BLOB_LENGTH),
+                                    e);
                             }
                         } else {
                             lobLength = ((Clob) c).length();
@@ -1237,7 +1256,9 @@
                     }
                     break;
                 default :
-                    throw new SqlException(netAgent_.logWriter_, "unrecognized sql type");
+                    throw new SqlException(netAgent_.logWriter_, 
+                        new ClientMessageId(SQLState.UNRECOGNIZED_JAVA_SQL_TYPE),
+                        new Integer(jdbcType));
                 }
 
                 if (!parameterMetaData.nullable_[i]) {
@@ -1321,12 +1342,15 @@
     //   prcnam can not be 0 length or > 255 length, SQLException will be thrown.
     private void buildPRCNAM(String prcnam) throws SqlException {
         if (prcnam == null) {
-            throw new SqlException(netAgent_.logWriter_, "null procedure name not supported");
+            throw new SqlException(netAgent_.logWriter_, 
+                new ClientMessageId(SQLState.NET_NULL_PROCEDURE_NAME));
         }
 
         int prcnamLength = prcnam.length();
         if ((prcnamLength == 0) || (prcnamLength > 255)) {
-            throw new SqlException(netAgent_.logWriter_, "procedure name length, " + prcnamLength
+ ", is not allowed.");
+            throw new SqlException(netAgent_.logWriter_, 
+                new ClientMessageId(SQLState.NET_PROCEDURE_NAME_LENGTH_OUT_OF_RANGE),
+                new Integer(prcnamLength), new Integer(255));
         }
 
         writeScalarString(CodePoint.PRCNAM, prcnam);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java?rev=408971&r1=408970&r2=408971&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAConnection.java Tue May
23 10:40:14 2006
@@ -31,6 +31,8 @@
 import org.apache.derby.client.am.Statement;
 
 import org.apache.derby.client.ClientPooledConnection;
+import org.apache.derby.client.am.ClientMessageId;
+import org.apache.derby.shared.common.reference.SQLState;
 
 import org.apache.derby.jdbc.ClientDriver;
 
@@ -232,10 +234,10 @@
         // unsupported version for platform
         String platform = null;
         platform = "Linux, Unix, Windows";
-        String versionMsg = "On " + platform + " XA supports version " +
-                supportedVersion + " and above, this is version " +
-                netCon.xaHostVersion_;
-        throw new SqlException(netCon.agent_.logWriter_, versionMsg);
+        throw new SqlException(netCon.agent_.logWriter_, 
+            new ClientMessageId(SQLState.NET_WRONG_XA_VERSION),
+            platform, new Integer(supportedVersion), 
+            new Integer(netCon.xaHostVersion_));
     }
     
     /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties?rev=408971&r1=408970&r2=408971&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 Tue May 23
10:40:14 2006
@@ -394,6 +394,9 @@
 22005.S.1=Unable to convert a value of type ''{0}'' to type ''{1}'' : the encoding is not
supported.
 22005.S.2=The required character converter is not available.
 22005.S.3=Unicode string can't convert to Ebcdic string
+22005.S.4=Unrecognized JDBC type. Type: {0}, columnCount: {1}, columnIndex: {2}.
+22005.S.5=Invalid JDBC type for parameter {0}.
+22005.S.6=Unrecognized Java SQL type {0}.
 22007.S.180=The string representation of a datetime value is out of range.
 22007.S.181=The syntax of the string representation of a datetime value is incorrect.
 22008.S=''{0}'' is an invalid argument to the {1} function.
@@ -1227,6 +1230,11 @@
 XN006.C=A connection could not be established because the password has a length of zero or
is larger than the maximum allowed by the network protocol.
 XN007.C=The connection was terminated because the encoding is not supported.
 XN008.S=Query processing has been terminated due to an error on the server.
+XN009.S=Error obtaining length of BLOB/CLOB object, exception follows.
+XN010.S=Procedure name can not be null.
+XN011.S=Procedure name length {0} is not within the valid range of 1 to {1}.
+XN012.S=On {0} platforms, XA supports version {1} and above, this is version {2}
+
 
 # 0A - SQLState class indicating feature not supported
 0A000.S=Feature not implemented: {0}.
@@ -1268,8 +1276,8 @@
 08001.C.2={0} : Error connecting to server {1} on port {2} with message {3}.
 08001.C.3=SocketException: ''{0}''
 08001.C.4=Unable to open stream on socket: ''{0}''.
-08001.C.5=User id length ({1}) is outside the range of 1 to {2}.
-08001.C.6=Password length ({1}) is outside the range of 1 to {2}.
+08001.C.5=User id length ({0}) is outside the range of 1 to {1}.
+08001.C.6=Password length ({0}) is outside the range of 1 to {1}.
 08001.C.7=User id can not be null.
 08001.C.8=Password can not be null.
 
@@ -1279,6 +1287,14 @@
 08006.C.3=A communications error has been detected: {0}.
 08006.C.4=An error occurred during a deferred connect reset and the connection has been terminated.
 See chained exceptions for details.
 08006.C.5=Insufficient data while reading from the network - expected a minimum of {0} bytes
and received only {1} bytes.  The connection has been terminated.
+08006.C.6=Attempt to fully materialize lob data that is too large for the JVM.  The connection
has been terminated.
+08006.C.7=Network protocol exception: scldta length, {0}, is invalid for rdbcolid.  The connection
has been terminated.
+08006.C.8=Network protocol exception: scldta length, {0}, is invalid for pkgid.  The connection
has been terminated.
+08006.C.9=Network protocol exception: PKGNAMCSN length, {0}, is invalid at SQLAM {1}.  The
connection has been terminated.
+08006.C.10=Network protocol exception: only one of the VCM, VCS length can be greater than
0.  The connection has been terminated.
+
+
+
 
 XJ015.M=Derby system shutdown.
 
@@ -1414,6 +1430,8 @@
 J125=a Data Descriptor Mismatch Error was detected.
 J126=a conversational protocol error was detected.  Reason: 0x{0}.
 J127=parseSQLDIAGGRP is not yet implemented
+J128=an Open Query command was issued for a query which was already open
+J129=A PROTOCOL Invalid FDOCA Description Error was detected
 
 
 # Authentication

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java?rev=408971&r1=408970&r2=408971&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java
(original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java
Tue May 23 10:40:14 2006
@@ -141,6 +141,8 @@
     String CONN_DRDA_RDBACCRM               = "J124";
     String CONN_DRDA_DTARMCHRM              = "J125";
     String CONN_DRDA_PRCCNVRM               = "J126";
+    String CONN_DRDA_QRYOPEN                = "J127";
+    String CONN_DRDA_INVALIDFDOCA           = "J128";
 
 	/*
 	** Authentication

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=408971&r1=408970&r2=408971&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
Tue May 23 10:40:14 2006
@@ -673,6 +673,9 @@
     String UNSUPPORTED_ENCODING                                        = "22005.S.1";
     String CHARACTER_CONVERTER_NOT_AVAILABLE                           = "22005.S.2";
     String CANT_CONVERT_UNICODE_TO_EBCDIC                              = "22005.S.3";
+    String NET_UNRECOGNIZED_JDBC_TYPE                                  = "22005.S.4";
+    String NET_INVALID_JDBC_TYPE_FOR_PARAM                             = "22005.S.5";
+    String UNRECOGNIZED_JAVA_SQL_TYPE                                  = "22005.S.6";
 
 	String LANG_DATE_RANGE_EXCEPTION                                   = "22007.S.180";
 	String LANG_DATE_SYNTAX_EXCEPTION                                  = "22007.S.181";
@@ -1510,7 +1513,7 @@
     String STORED_PROC_LOAD_MODULE_NOT_FOUND = "XJ210.S";
     String BATCH_CHAIN_BREAKING_EXCEPTION = "XJ211.S";
     String INVALID_ATTRIBUTE_SYNTAX = "XJ212.S";
-    String TRACELEVEL_FORMAT_INVALID = "XJ213.S";
+    String TRACELEVEL_FORMAT_INVALID = "XJ213.C";
     String IO_ERROR_UPON_LOB_FREE = "XJ214.S";
     String LOB_OBJECT_INVALID = "XJ215.S";
     
@@ -1523,6 +1526,10 @@
     String NET_PASSWORD_TOO_LONG                                    = "XN006.C";
     String NET_ENCODING_NOT_SUPPORTED                               = "XN007.C";
     String NET_QUERY_PROCESSING_TERMINATED                          = "XN008.S";
+    String NET_ERROR_GETTING_BLOB_LENGTH                            = "XN009.S";
+    String NET_NULL_PROCEDURE_NAME                                  = "XN010.S";
+    String NET_PROCEDURE_NAME_LENGTH_OUT_OF_RANGE                   = "XN011.S";
+    String NET_WRONG_XA_VERSION                                     = "XN012.S";
     
     // Used by server for scrollable updatable insensitive result sets
     // to transmit updated state to client. Internal, not seen by user.
@@ -1575,6 +1582,12 @@
     String COMMUNICATION_ERROR                                  = "08006.C.3";
     String CONNECTION_FAILED_ON_DEFERRED_RESET                  = "08006.C.4";
     String NET_INSUFFICIENT_DATA                                = "08006.C.5";
+    String NET_LOB_DATA_TOO_LARGE_FOR_JVM                       = "08006.C.6";
+    String NET_SQLCDTA_INVALID_FOR_RDBCOLID                     = "08006.C.7";
+    String NET_SQLCDTA_INVALID_FOR_PKGID                        = "08006.C.8";
+    String NET_PGNAMCSN_INVALID_AT_SQLAM                        = "08006.C.9";
+    String NET_VCM_VCS_LENGTHS_INVALID                          = "08006.C.10";
+
     
     // 08001 is specifically about the SQL client not being able to establish
     // a connection with the server.  Should only be used for errors that
@@ -1593,6 +1606,7 @@
     String CONNECT_PASSWORD_LENGTH_OUT_OF_RANGE                 = "08001.C.6";
     String CONNECT_USERID_ISNULL                                = "08001.C.7";
     String CONNECT_PASSWORD_ISNULL                              = "08001.C.8";
+
         
     // system severity
     String SHUTDOWN_DATABASE = "08006.D";  

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out?rev=408971&r1=408970&r2=408971&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
Tue May 23 10:40:14 2006
@@ -87,8 +87,8 @@
   setNull with batching support(BLOB) getShort=0 was null true
   setNull(Types.NULL) getShort=0 was null true
   setNull with batching support(Types.NULL) getShort=0 was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on SMALLINT
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getShort=98 was null false JDBC MATCH(OK)
@@ -260,8 +260,8 @@
   setNull with batching support(BLOB) getInt=0 was null true
   setNull(Types.NULL) getInt=0 was null true
   setNull with batching support(Types.NULL) getInt=0 was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on INTEGER
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getInt=98 was null false JDBC MATCH(OK)
@@ -433,8 +433,8 @@
   setNull with batching support(BLOB) getLong=0 was null true
   setNull(Types.NULL) getLong=0 was null true
   setNull with batching support(Types.NULL) getLong=0 was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on BIGINT
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getLong=98 was null false JDBC MATCH(OK)
@@ -606,8 +606,8 @@
   setNull with batching support(BLOB) getFloat=0.0 was null true
   setNull(Types.NULL) getFloat=0.0 was null true
   setNull with batching support(Types.NULL) getFloat=0.0 was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on REAL
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getFloat=98.0 was null false JDBC MATCH(OK)
@@ -780,8 +780,8 @@
   setNull with batching support(BLOB) getDouble=0.0 was null true
   setNull(Types.NULL) getDouble=0.0 was null true
   setNull with batching support(Types.NULL) getDouble=0.0 was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on FLOAT
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getDouble=98.0 was null false JDBC MATCH(OK)
@@ -953,8 +953,8 @@
   setNull with batching support(BLOB) getDouble=0.0 was null true
   setNull(Types.NULL) getDouble=0.0 was null true
   setNull with batching support(Types.NULL) getDouble=0.0 was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on DOUBLE
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getDouble=98.0 was null false JDBC MATCH(OK)
@@ -1126,8 +1126,8 @@
   setNull with batching support(BLOB) getBigDecimal=null was null true
   setNull(Types.NULL) getBigDecimal=null was null true
   setNull with batching support(Types.NULL) getBigDecimal=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on DECIMAL(10,5)
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getBigDecimal=98.00000 was null false JDBC MATCH(OK)
@@ -1305,8 +1305,8 @@
   setNull with batching support(BLOB) getString=null was null true
   setNull(Types.NULL) getString=null was null true
   setNull with batching support(Types.NULL) getString=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on CHAR(60)
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getString=98                                                           was null
false JDBC MATCH(OK)
@@ -1477,8 +1477,8 @@
   setNull with batching support(BLOB) getString=null was null true
   setNull(Types.NULL) getString=null was null true
   setNull with batching support(Types.NULL) getString=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on VARCHAR(60)
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getString=98 was null false JDBC MATCH(OK)
@@ -1649,8 +1649,8 @@
   setNull with batching support(BLOB) getString=null was null true
   setNull(Types.NULL) getString=null was null true
   setNull with batching support(Types.NULL) getString=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on LONG VARCHAR
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() getString=98 was null false JDBC MATCH(OK)
@@ -1823,8 +1823,8 @@
   setNull with batching support(BLOB) getBytes=null was null true
   setNull(Types.NULL) getBytes=null was null true
   setNull with batching support(Types.NULL) getBytes=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on VARCHAR(60) FOR BIT DATA
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() IC JDBC MATCH (INVALID)
@@ -1998,8 +1998,8 @@
   setNull with batching support(BLOB) getDate=null was null true
   setNull(Types.NULL) getDate=null was null true
   setNull with batching support(Types.NULL) getDate=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on DATE
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() IC JDBC MATCH (INVALID)
@@ -2171,8 +2171,8 @@
   setNull with batching support(BLOB) getTime=null was null true
   setNull(Types.NULL) getTime=null was null true
   setNull with batching support(Types.NULL) getTime=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on TIME
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() IC JDBC MATCH (INVALID)
@@ -2344,8 +2344,8 @@
   setNull with batching support(BLOB) getTimestamp=null was null true
   setNull(Types.NULL) getTimestamp=null was null true
   setNull with batching support(Types.NULL) getTimestamp=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on TIMESTAMP
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() IC JDBC MATCH (INVALID)
@@ -2517,8 +2517,8 @@
   setNull with batching support(BLOB) getClob=null was null true
   setNull(Types.NULL) getClob=null was null true
   setNull with batching support(Types.NULL) getClob=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on CLOB(1k)
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() IC JDBC MATCH (INVALID)
@@ -2689,8 +2689,8 @@
   setNull with batching support(BLOB) getBlob=null was null true
   setNull(Types.NULL) getBlob=null was null true
   setNull with batching support(Types.NULL) getBlob=null was null true
-  setNull(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized sql type
-  setNull with batching support(235350345) SQLSTATE(null): java.sql.SQLException: unrecognized
sql type
+  setNull(235350345) IC
+  setNull with batching support(235350345) IC
 setXXX() with all JDBC Types on BLOB(1k)
 For setXXX() methods that pass an object, a null and valid values are checked
   setByte() IC JDBC MATCH (INVALID)

Modified: db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed?rev=408971&r1=408970&r2=408971&view=diff
==============================================================================
--- db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed (original)
+++ db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed Tue May 23 10:40:14
2006
@@ -80,6 +80,17 @@
 s/[[:space:]]manager/ "manager"/g
 s/[[:space:]]level));/ "level");/g
 s/[[:space:]]operation/ "operation"/g
+s/[[:space:]]attributeString/ "attributeString"/g
+s/[[:space:]]attribute/ "attributeString"/g
+s/[[:space:]]value/ "string"/g
+s/[[:space:]]choicesStr/ "string"/g
+s/[[:space:]]url/ "string"/g
+s/[[:space:]]fp\.getFirstKey()/ "string"/g
+s/[[:space:]]fp\.getFirstValue()/ "string"/g
+s/,uee/,testException/g
+s/[[:space:]]platform/ "string"/g
+
+
 
 # 
 # Deal with extra updateCounts argument to BatchUpdateExceptoins.

Modified: db/derby/code/trunk/tools/testing/i18nTestGenerator/generateClientMessageTest.sh
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/i18nTestGenerator/generateClientMessageTest.sh?rev=408971&r1=408970&r2=408971&view=diff
==============================================================================
--- db/derby/code/trunk/tools/testing/i18nTestGenerator/generateClientMessageTest.sh (original)
+++ db/derby/code/trunk/tools/testing/i18nTestGenerator/generateClientMessageTest.sh Tue May
23 10:40:14 2006
@@ -3,6 +3,14 @@
 TESTDIR=java/testing/org/apache/derbyTesting/functionTests/tests/i18n
 ROOT=$1
 
+GSED=`which gsed`
+if [ "$GSED" = "" ]
+then
+  SED=sed
+else
+  SED=$GSED
+fi
+
 syntax()
 {
   echo "syntax: $0 derby_rootdir"
@@ -61,7 +69,7 @@
 for i in $FILES
 do
   echo "    // from source file $i" >> $FILE
-  sed -n -f $MYDIR/genClient1.sed $i | sed -f $MYDIR/genClient2.sed >> $FILE 
+  $SED -n -f $MYDIR/genClient1.sed $i | $SED -f $MYDIR/genClient2.sed >> $FILE 
   #sed -n -f $MYDIR/genClient1.sed $i >> $FILE
 done
 



Mime
View raw message