db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r410384 - in /db/derby/code/trunk: java/client/org/apache/derby/client/am/ 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...
Date Tue, 30 May 2006 21:46:45 GMT
Author: davidvc
Date: Tue May 30 14:46:44 2006
New Revision: 410384

URL: http://svn.apache.org/viewvc?rev=410384&view=rev
Log:
DERBY-1350: Remove old constructors for SqlException and
DisconnectException and clean up any remaining users of the old
constructors.


Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalConnection.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/SqlException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.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/NetXAResource.java
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/build.xml
    db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient1.sed
    db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Blob.java Tue May 30 14:46:44
2006
@@ -241,7 +241,7 @@
         try {
             return binaryStringPosition(pattern.getBytes(1L, (int) pattern.length()), start);
         } catch (java.sql.SQLException e) {
-            throw new SqlException(agent_.logWriter_, e.getMessage());
+            throw new SqlException(e);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Clob.java Tue May 30 14:46:44
2006
@@ -733,7 +733,7 @@
         try {
             rdr = clob.getCharacterStream();
         } catch (java.sql.SQLException e) {
-            throw new SqlException(agent_.logWriter_, e.getMessage());
+            throw SqlException.javaException(agent_.logWriter_, e);
         }
 
         return new Clob(this.agent_, rdr, (int) length);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java Tue May
30 14:46:44 2006
@@ -204,7 +204,7 @@
                     new ClientMessageId (SQLState.ERROR_PRIVILEGED_ACTION),
                     e.getException());                    
         } catch (java.io.IOException ioe) {
-            throw new SqlException(null, ioe, null);
+            throw SqlException.javaException(null, ioe);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java Tue May
30 14:46:44 2006
@@ -710,7 +710,9 @@
                     read = is.read();
                 }
             } catch (java.io.IOException e) {
-                throw new SqlException(agent_.logWriter_, e, null);
+                throw new SqlException(agent_.logWriter_, 
+                    new ClientMessageId(SQLState.JAVA_EXCEPTION),
+                    e.getClass().getName(), e.getMessage(), e);
             }
 
             if (length != totalRead) {
@@ -782,7 +784,7 @@
                 		new ClientMessageId (SQLState.READER_UNDER_RUN));
             }
         } catch (java.io.IOException e) {
-            throw new SqlException(agent_.logWriter_, e, null);
+            throw SqlException.javaException(agent_.logWriter_, e);
         }
         return baos.toByteArray();
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java Tue
May 30 14:46:44 2006
@@ -20,6 +20,8 @@
 
 package org.apache.derby.client.am;
 
+import org.apache.derby.shared.common.reference.SQLState;
+
 public class DisconnectException extends SqlException {
     public DisconnectException(Agent agent, ClientMessageId msgid,
         Object[] args, SqlCode sqlcode, Throwable t)  {
@@ -70,46 +72,9 @@
         this(agent, msgid, new Object[] { arg1, arg2 });
     }
     
-    // Old constructors for backward compatibility until all classes
-    // have been internationalized
-    public DisconnectException(Agent agent, String reason, SqlState sqlstate, SqlCode sqlcode)
{
-        super(agent.logWriter_, reason, sqlstate, sqlcode);
-    }
-
-    public DisconnectException(Agent agent, String reason, SqlState sqlstate) {
-        super(agent.logWriter_, reason, sqlstate, SqlCode.disconnectError);
-        // make the call to close the streams and socket.
-        if (agent != null) {
-            agent.disconnectEvent();
-        }
-    }
-
-    public DisconnectException(java.lang.Throwable throwable, Agent agent, String reason,
SqlState sqlstate) {
-        super(agent.logWriter_, throwable, reason, sqlstate, SqlCode.disconnectError);
-        // make the call to close the streams and socket.
-        if (agent != null) {
-            agent.disconnectEvent();
-        }
-    }
-
-    public DisconnectException(Agent agent) {
-        this(agent, (String)null, SqlState.undefined);
-    }
-
-    public DisconnectException(java.lang.Throwable throwable, Agent agent) {
-        this(throwable, agent, null, SqlState.undefined);
-    }
-
-    public DisconnectException(Agent agent, String reason) {
-        this(agent, reason, SqlState.undefined);
-    }
-
-    public DisconnectException(Throwable throwable, Agent agent, String reason) {
-        this(throwable, agent, reason, SqlState.undefined);
-    }
-
     public DisconnectException(Agent agent, SqlException e) {
-        this(agent, e.getMessage());
-        setNextException(e);
+        super(agent.logWriter_,
+            new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
+            e.getMessage(), e);
     }
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java Tue May 30 14:46:44
2006
@@ -1251,7 +1251,9 @@
                 	properties.setProperty(propertyKey, value);
             }
         } catch (NamingException e) {
-            throw new SqlException(this, e.toString());
+            throw new SqlException(this, 
+                new ClientMessageId(SQLState.JAVA_EXCEPTION),
+                e.getClass().getName(), e.getMessage(), e);
         }
         
         return properties;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalConnection.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalConnection.java Tue
May 30 14:46:44 2006
@@ -72,7 +72,9 @@
 
             if (physicalConnection_.isClosed()) // connection is closed or has become stale
             {
-                pooledConnection_.trashConnection(new SqlException(null, "Connection is stale."));
+                pooledConnection_.trashConnection(new SqlException(null, 
+                    new ClientMessageId(
+                        SQLState.PHYSICAL_CONNECTION_ALREADY_CLOSED)));
             } else {
                 physicalConnection_.closeForReuse();
                 if (!physicalConnection_.isGlobalPending_()) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java?rev=410384&r1=410383&r2=410384&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 Tue
May 30 14:46:44 2006
@@ -1954,8 +1954,7 @@
         catch (SqlException e) { // for chain-breaking exception only
             chainBreaker = e;
             chainBreaker.setNextException(new SqlException(agent_.logWriter_,
-                    "Non-recoverable chain-breaking exception occurred during batch processing.
 " +
-                    "The batch is terminated non-atomically."));
+                new ClientMessageId(SQLState.BATCH_CHAIN_BREAKING_EXCEPTION)));
         }
         // We need to clear the batch before any exception is thrown from agent_.endBatchedReadChain().
         batch_.clear();

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java?rev=410384&r1=410383&r2=410384&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 Tue May 30
14:46:44 2006
@@ -267,13 +267,13 @@
     
     // Once all messages are internationalized, these methods should become
     // private
-    public SqlException(LogWriter logWriter, String reason, String sqlState,
+    protected SqlException(LogWriter logWriter, String reason, String sqlState,
         int errorCode)
     {
         this(logWriter, (Throwable)null, reason, sqlState, errorCode);
     }
 
-    public SqlException(LogWriter logWriter, java.lang.Throwable throwable, 
+    protected SqlException(LogWriter logWriter, java.lang.Throwable throwable, 
         String reason, String sqlState, int errorCode ) {
         message_ = reason;
         sqlstate_ = sqlState;
@@ -334,52 +334,7 @@
     {
         wrappedException_ = wrapme;
     }
-            
-    // Constructors for backward-compatibility while we're internationalizng
-    // all the messages.  These should be removed once internationalization is
-    // complete
-    public SqlException(LogWriter logWriter) {
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    public SqlException(LogWriter logWriter, String reason) {
-        this(logWriter, reason, null, DEFAULT_ERRCODE);
-    }
-
-    public SqlException(LogWriter logWriter, java.lang.Throwable throwable, String reason)
{
-        this(logWriter, throwable, reason, null, DEFAULT_ERRCODE);
-    }
-
-    public SqlException(LogWriter logWriter, java.lang.Throwable throwable, String reason,
SqlState sqlstate) {
-        this(logWriter, throwable, reason, sqlstate.getState(), DEFAULT_ERRCODE);
-    }
-
-    public SqlException(LogWriter logWriter, java.lang.Throwable throwable, String reason,
String sqlstate) {
-        this(logWriter, throwable, reason, sqlstate, DEFAULT_ERRCODE);
-    }
-
-    public SqlException(LogWriter logWriter, String reason, SqlState sqlState) {
-        this(logWriter, reason, sqlState.getState(), DEFAULT_ERRCODE);
-    }
-
-    public SqlException(LogWriter logWriter, String reason, String sqlState) {
-        this(logWriter, reason, sqlState, DEFAULT_ERRCODE);
-    }
-
-    public SqlException(LogWriter logWriter, String reason, SqlState sqlState, SqlCode errorCode)
{
-        this(logWriter, reason, sqlState.getState(), errorCode.getCode());
-    }
-    
-
-    public SqlException(LogWriter logWriter, java.lang.Throwable throwable, String reason,
SqlState sqlState, SqlCode errorCode) {
-        this(logWriter, throwable, reason, sqlState.getState(), 
-            errorCode.getCode());
-    }
-
-    //--- End backward-compatibility constructors ----------------------
-    
+                
     
     /**
      * Convert this SqlException into a java.sql.SQLException

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java Tue May
30 14:46:44 2006
@@ -466,7 +466,9 @@
                 exceptionToBeThrown = (SqlException) e;
             } else // any other exceptions will be wrapped by an SqlException first
             {
-                exceptionToBeThrown = new SqlException(agent_.logWriter_, e, "Unexpected
throwable caught " + e.toString());
+                exceptionToBeThrown = new SqlException(agent_.logWriter_, 
+                    new ClientMessageId(SQLState.JAVA_EXCEPTION),
+                    e.getClass().getName(), e.getMessage(), e);
             }
 
             try {
@@ -926,7 +928,9 @@
 
                     // a security token is required for USRENCPWD, or EUSRIDPWD.
                     if (!sectknReceived) {
-                        agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
"secktn was not returned "));
+                        agent_.accumulateChainBreakingReadExceptionAndThrow(
+                            new DisconnectException(agent_, 
+                                new ClientMessageId(SQLState.NET_SECTKN_NOT_RETURNED)));
                     } else {
                         targetPublicKey_ = sectkn;
                         if (encryptionManager_ != null) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java Tue
May 30 14:46:44 2006
@@ -3218,8 +3218,10 @@
                 stringToBeSet = readFastString(vcm_length, netAgent_.targetTypdef_.getCcsidMbcEncoding());
             }
             if (readFastUnsignedByte() != CodePoint.NULLDATA) {
-                agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                        "only one of NVCM, NVCS can be non-none"));
+                agent_.accumulateChainBreakingReadExceptionAndThrow(
+                    new DisconnectException(agent_,
+                        new ClientMessageId(
+                            SQLState.NET_NVCM_NVCS_BOTH_NON_NULL)));
             }
         } else {
             if (readFastUnsignedByte() != CodePoint.NULLDATA) {
@@ -3243,8 +3245,10 @@
                 skipFastBytes(vcm_length);
             }
             if (readFastUnsignedByte() != CodePoint.NULLDATA) {
-                agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                        "only one of NVCM, NVCS can be non-none"));
+                agent_.accumulateChainBreakingReadExceptionAndThrow(
+                    new DisconnectException(agent_,
+                        new ClientMessageId(
+                            SQLState.NET_NVCM_NVCS_BOTH_NON_NULL)));
             }
         } else {
             if (readFastUnsignedByte() != CodePoint.NULLDATA) {

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=410384&r1=410383&r2=410384&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 30 14:46:44 2006
@@ -1542,8 +1542,11 @@
             // get rdbnam
             int scldtaLen = peekFastLength();
             if (scldtaLen < 18 || scldtaLen > 255) {
-                agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                        "scldta length, " + scldtaLen + ", is invalid for rdbnam"));
+                agent_.accumulateChainBreakingReadExceptionAndThrow(
+                    new DisconnectException(agent_,
+                        new ClientMessageId(
+                            SQLState.NET_SQLCDTA_INVALID_FOR_RDBNAM),
+                    new Integer(scldtaLen)));
                 return null;
             }
             // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java Tue May
30 14:46:44 2006
@@ -53,6 +53,8 @@
 import org.apache.derby.client.ClientXid;
 import org.apache.derby.client.am.Connection;
 import org.apache.derby.client.am.SqlException;
+import org.apache.derby.client.am.ClientMessageId;
+import org.apache.derby.shared.common.reference.SQLState;
 
 public class NetXAResource implements XAResource {
     public static final int TMTIMEOUT = 0x00000100;
@@ -869,7 +871,8 @@
 
     private void connectionClosedFailure() throws XAException { // throw an XAException XAER_RMFAIL,
with a chained SqlException - closed
         exceptionsOnXA = org.apache.derby.client.am.Utils.accumulateSQLException
-                (new SqlException(null, "Connection is Closed."),
+                (new SqlException(null, 
+                        new ClientMessageId(SQLState.NO_CURRENT_CONNECTION)),
                         exceptionsOnXA);
         throwXAException(javax.transaction.xa.XAException.XAER_RMFAIL);
     }
@@ -902,12 +905,11 @@
 
         if (rc != XAResource.XA_OK) { // error was detected
             // create an SqlException to report this error within
-            String xaRetValStr = "Error executing a " +
-                    getXAFuncStr(callInfo.xaFunction_) + ", " +
-                    "Server returned " + getXAExceptionText(rc);
             SqlException accumSql = new SqlException(conn_.netAgent_.logWriter_,
-                    xaRetValStr, org.apache.derby.client.am.SqlState.undefined,
-                    org.apache.derby.client.am.SqlCode.queuedXAError);
+                new ClientMessageId(SQLState.NET_XARETVAL_ERROR),
+                getXAFuncStr(callInfo.xaFunction_),
+                getXAExceptionText(rc),
+                org.apache.derby.client.am.SqlCode.queuedXAError);
             exceptionsOnXA = org.apache.derby.client.am.Utils.accumulateSQLException
                     (accumSql, exceptionsOnXA);
 

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=410384&r1=410383&r2=410384&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 30
14:46:44 2006
@@ -283,7 +283,10 @@
 58009.C.15=Network protocol exception: DSS length not 0 at end of same id chain parse.  The
connection has been terminated.
 58009.C.16=Network protocol exception: DSS chained with same id at end of same id chain parse.
 The connection has been terminated.
 58009.C.17=Network protocol exception: end of stream prematurely reached while reading InputStream,
parameter #{0}.  The connection has been terminated.
-58009.C.18=Network protocol exceptoin: invalid FDOCA LID.  The connection has been terminated.
+58009.C.18=Network protocol exception: invalid FDOCA LID.  The connection has been terminated.
+58009.C.19=Network protocol exception: secktn was not returned.  The connection has been
terminated.
+58009.C.20=Network protocol exception: only one of NVCM, NVCS can be non-null.  The connection
has been terminated.
+58009.C.21=Network protocol exception: scldta length, {0}, is invalid for rdbnam.  The connection
has been terminated.
 
 
 58010.C=A network protocol error was encountered.  A connection could not be established
because the manager {0} at level {1} is not supported by the server. 
@@ -1257,6 +1260,7 @@
 XN016.S=Network protocol error: encountered error in stream length verification, parameter
#{0}.  Message: {1}.
 XN017.S=Network protocol error: end of stream prematurely reached, parameter #{0}.  Remaining
data has been padded with 0x0.
 XN018.S=Network protocol error: the specified size of the Reader, parameter #{0}, is less
than the actual InputStream length.
+XN019.S=Error executing a {0}, server returned {1}.
 
 # 0A - SQLState class indicating feature not supported
 0A000.S=Feature not implemented: {0}.
@@ -1275,6 +1279,8 @@
 08003=No current connection.
 08003.C.1=getConnection() is not valid on a closed PooledConnection.
 08003.C.2=Lob method called after connection was closed
+08003.C.3=The underlying physical connection is stale or closed.
+
 
 # NOTE - the {0} parameter needs to be internationalized too.  Don't
 # just put in a hardcoded string in your exception code.
@@ -1310,19 +1316,6 @@
 
 08006.D=Database ''{0}'' shutdown.
 08006.C.1=An error occurred during connect reset and the connection has been terminated.
 See chained exceptions for details.
-08006.C.2=SocketException: ''{0}''
-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.
-08006.C.11=The connection was terminated because the encoding is not supported.
-
-
-
 
 XJ015.M=Derby system shutdown.
 

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=410384&r1=410383&r2=410384&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 30 14:46:44 2006
@@ -1532,6 +1532,7 @@
     String NET_IOEXCEPTION_ON_STREAMLEN_VERIFICATION                = "XN016.S";
     String NET_PREMATURE_EOS                                        = "XN017.S";
     String NET_READER_LENGTH_TOO_SMALL                              = "XN018.S";
+    String NET_XARETVAL_ERROR                                       = "XN019.S";
     
     // Used by server for scrollable updatable insensitive result sets
     // to transmit updated state to client. Internal, not seen by user.
@@ -1560,8 +1561,6 @@
 	String INVALID_LISTEN_TYPE = "X0RQ6.S";
     
     // Connection exceptions - SQL State class 08
-    //following are database severity
-    String NO_CURRENT_CONNECTION = "08003";
     
     // 08004 SQL State means the server rejected the connection request
     String LOGIN_FAILED = "08004";
@@ -1572,8 +1571,11 @@
     // to SQL2003 spec means "connection does not exist"
     // We use a suffix to distinguish them.  Because of the suffix
     // you *must* add a severity code
+    String NO_CURRENT_CONNECTION = "08003";
     String NOGETCONN_ON_CLOSED_POOLED_CONNECTION = "08003.C.1";
     String LOB_METHOD_ON_CLOSED_CONNECTION = "08003.C.2";
+    String PHYSICAL_CONNECTION_ALREADY_CLOSED = "08003.C.3";
+
     
     // 08006 means connection exception - connection failure
     String CONNECTION_FAILED_ON_RESET                           = "08006.C.1";
@@ -1677,6 +1679,9 @@
     String NET_DSS_CHAINED_WITH_SAME_ID                             = "58009.C.16";
     String NET_PREMATURE_EOS_DISCONNECT                             = "58009.C.17";
     String NET_INVALID_FDOCA_ID                                     = "58009.C.18";
+    String NET_SECTKN_NOT_RETURNED                                  = "58009.C.19";
+    String NET_NVCM_NVCS_BOTH_NON_NULL                              = "58009.C.20";
+    String NET_SQLCDTA_INVALID_FOR_RDBNAM                           = "58009.C.21";
 
     String DRDA_MGRLVLRM                                            = "58010.C";
     String DRDA_DDM_COMMAND_NOT_SUPPORTED                           = "58014.C";

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
Tue May 30 14:46:44 2006
@@ -536,13 +536,13 @@
 sruBatch: mismatched Statement connection
 sruBatch: ru(SQL_CURLH000C) contents {1} {2} {3} {4} {5} {6} {7} {8}
 XAConnection.getConnection : getConnection() is not valid on a closed PooledConnection.
-XAResource.start : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.end : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.commit : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.prepare : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.recover : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.prepare : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.isSameRM : XAException - XAER_RMFAIL : Connection is Closed.
+XAResource.start : XAException - XAER_RMFAIL : No current connection.
+XAResource.end : XAException - XAER_RMFAIL : No current connection.
+XAResource.commit : XAException - XAER_RMFAIL : No current connection.
+XAResource.prepare : XAException - XAER_RMFAIL : No current connection.
+XAResource.recover : XAException - XAER_RMFAIL : No current connection.
+XAResource.prepare : XAException - XAER_RMFAIL : No current connection.
+XAResource.isSameRM : XAException - XAER_RMFAIL : No current connection.
 Patricio update count 1
 conn4 autcommit true
 acxs 1
@@ -550,7 +550,7 @@
 autocommitxastart expected ResultSet not open.  Verify that autocommit is OFF.
 acxs 1
 acxs 2
-autocommitxastart expected  : XAException - XAER_OUTSIDE : Error executing a XAResource.start(),
Server returned XAER_OUTSIDE
+autocommitxastart expected  : XAException - XAER_OUTSIDE : Error executing a XAResource.start(),
server returned XAER_OUTSIDE.
 Expected XA error code: -9
 acxs 3
 testing jira 95 for DataSource; ok - expected exception: XCY00

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
Tue May 30 14:46:44 2006
@@ -653,13 +653,13 @@
 sruBatch: mismatched Statement connection
 sruBatch: ru(SQL_CURLH000C) contents {1} {2} {3} {4} {5} {6} {7} {8}
 XAConnection.getConnection : getConnection() is not valid on a closed PooledConnection.
-XAResource.start : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.end : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.commit : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.prepare : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.recover : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.prepare : XAException - XAER_RMFAIL : Connection is Closed.
-XAResource.isSameRM : XAException - XAER_RMFAIL : Connection is Closed.
+XAResource.start : XAException - XAER_RMFAIL : No current connection.
+XAResource.end : XAException - XAER_RMFAIL : No current connection.
+XAResource.commit : XAException - XAER_RMFAIL : No current connection.
+XAResource.prepare : XAException - XAER_RMFAIL : No current connection.
+XAResource.recover : XAException - XAER_RMFAIL : No current connection.
+XAResource.prepare : XAException - XAER_RMFAIL : No current connection.
+XAResource.isSameRM : XAException - XAER_RMFAIL : No current connection.
 Patricio update count 1
 conn4 autcommit true
 acxs 1
@@ -667,7 +667,7 @@
 autocommitxastart expected ResultSet not open.  Verify that autocommit is OFF.
 acxs 1
 acxs 2
-autocommitxastart expected  : XAException - XAER_OUTSIDE : Error executing a XAResource.start(),
Server returned XAER_OUTSIDE
+autocommitxastart expected  : XAException - XAER_OUTSIDE : Error executing a XAResource.start(),
server returned XAER_OUTSIDE.
 Expected XA error code: -9
 acxs 3
 testing jira 95 for DataSource; ok - expected exception: XCY00

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/build.xml?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/build.xml
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/build.xml
Tue May 30 14:46:44 2006
@@ -50,6 +50,7 @@
   </target>
 
   <target name="compile">
+    <echo message="junit is ${junit}"/>
     <javac
       source="1.3"
       target="1.3"
@@ -66,6 +67,7 @@
       <classpath>
         <!--pathelement location="${oro}"/-->
         <pathelement path="${compile.classpath}"/>
+        <pathelement path="${junit}"/>
       </classpath>
       <include name="${this.dir}/*.java"/>
     </javac>

Modified: db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient1.sed
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient1.sed?rev=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient1.sed (original)
+++ db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient1.sed Tue May 30 14:46:44
2006
@@ -5,7 +5,3 @@
 /new ClientMessageId.*);/p
 # Catch situation where the ClientMessageId parameter is on the next line
 /new ClientMessageId[^;]*$/,/);/p
-
-# This is a wrapper used in net/Reply.java that we need to test
-/zThrowSyntaxError[^;]*$/,/);/p
-

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=410384&r1=410383&r2=410384&view=diff
==============================================================================
--- db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed (original)
+++ db/derby/code/trunk/tools/testing/i18nTestGenerator/genClient2.sed Tue May 30 14:46:44
2006
@@ -1,14 +1,14 @@
-# For those expressions that start with "new ClientMessageId", pre-append
-# a try block and create a SqlException to complete the expression
-/^[[:space:]]*new ClientMessageId/i\
-    try { \
-       testException = new SqlException(null,
-
 # For those expressions that start with "new <something>Exception", pre-append
 # a try block
 /new[[:space:]]*[a-zA-Z]*Exception/i\
     try {
 
+# For those expressions that start with "new ClientMessageId", pre-append
+# a try block and create a SqlException to complete the expression
+/^[[:space:]]*new ClientMessageId.*/i\
+    try { \
+       testException = new SqlException(null, 
+
 # At the end of each statement, check and print out an error
 # if there is a problem
 /;/a \
@@ -34,7 +34,8 @@
 # the variable with a string containing the variable.  This prevents
 # compile errors saying "symbol not found"
 #
-s/logWriter/null/g
+s/[([:space:]]logWriter,/null,/g
+s/[([:space:]]logWriter_,/null,/g
 s/fileName/"fileName"/g
 s/[[:space:]]e.getMessage()/"e.getMessage"/g
 s/Configuration.packageNameForDNC/"Configuration.packageNameForDNC"/g
@@ -93,7 +94,11 @@
 s/[[:space:]]identifier/ "string"/g
 s/[[:space:]]arg2))/ "arg2")/g
 s/[[:space:]]arg1/ "string"/g
-s/agent_/ null/g
+s/[[:space:]]exceptionsOnXA/ testException/g
+s/[[:space:]]getXAFuncStr(.*)/ "string"/g
+s/[[:space:]]getXAExceptionText(.*)/ "string"/g
+s/agent_.logWriter_,/ null,/g
+s/NO_CURRENT_CONNECTION)),/NO_CURRENT_CONNECTION),/g
 
 
 
@@ -113,7 +118,7 @@
 s/Integer.toHexString[[:space:]]*([^)]*/Integer.toHexString(0/g
 
 # Get rid of logWriter
-s/new SqlException[[:space:]]*(.*,/new SqlException(null,/g
+#s/new SqlException[[:space:]]*(.*,/new SqlException(null,/g
 
 # Don't throw, just assign
 s/throw new/testException = new/g



Mime
View raw message