db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1369) Provide client localization for severe server side exceptions
Date Fri, 02 Jun 2006 21:32:30 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1369?page=comments#action_12414522 ] 

David Van Couvering commented on DERBY-1369:

Hm.  When I signed up to localize client messages, I did not think that messages coming from
the server were in scope.  Also, since the *server* has been localizing messages for a while
now, I would think that this is a server issue, and that it has existed as an issue even in
10.1.  So personally I would label this as a bug starting in 10.1

> 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:
>     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
>  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:
For more information on JIRA, see:

View raw message