db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-1369) Provide client localization for severe server side exceptions
Date Fri, 02 Jun 2006 18:37:29 GMT
Provide client localization for severe server side exceptions
-------------------------------------------------------------

         Key: DERBY-1369
         URL: http://issues.apache.org/jira/browse/DERBY-1369
     Project: Derby
        Type: Improvement

  Components: Localization, Network Client, Network Server  
    Versions: 10.1.2.1    
    Reporter: Kathey Marsden
    Priority: Minor


Error messages for severe server side exceptions do not get localized according to the client
locale.  It would be good for these to be localized and print in the same format as other
exceptions.

Perhaps this could be achieved by bundling these messages with client.  Care would need to
be taken for compatibility.  The current behaviour is described below:

 
Client  relies on calling the SYSIBM.SQLCAMESSAGE procedure to retrieve the message text.
For severe errors
>= ExceptionSeverity.SESSION_SEVERITY
we do not get the localized exception according to the client locale.  We cannot call the
stored procedure to get the localized exception from the server, so the server just sends
the preformatted message in the message tokens according to the server locale and the client
prints out  a message like this:


 connect 'jdbc:derby://localhost:1527/wombat';
Connection number: 2.
ERROR XJ040: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database
'wombat', see the next exception for details.::SQLSTATE: XSLAPDatabase at C:\marsden\repro\7594\wombat
is
 at version 10.2 beta. Beta databases cannot be upgraded,
ij>


This is the code where this processing is done in the server DRDAConnThread
			// If this is not an EmbedSQLException or is a severe excecption where
			// we have no hope of succussfully calling the SYSIBM.SQLCAMESSAGE send
			// preformatted message using the server locale
			sqlerrmc = buildPreformattedSqlerrmc(se);
			}
			// Truncate the sqlerrmc to a length that the client can support.
			int maxlen = (sqlerrmc == null) ? -1 : Math.min(sqlerrmc.length(),
					appRequester.supportedMessageParamLength());
			if ((maxlen >= 0) && (sqlerrmc.length() > maxlen))
			// have to truncate so the client can handle it.
			sqlerrmc = sqlerrmc.substring(0, maxlen);
			return sqlerrmc;



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message