You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2005/05/14 01:18:06 UTC

[jira] Created: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
----------------------------------------------------------------------------------------------------------------------------------------

         Key: DERBY-285
         URL: http://issues.apache.org/jira/browse/DERBY-285
     Project: Derby
        Type: Improvement
  Components: Network Client  
    Versions: 10.1.0.0    
    Reporter: Kathey Marsden


If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.


To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.

Start network server

java org.apache.derby.drda.NetworkServerControl start

$ java org.apache.derby.tools.ij
ij version 10.1
ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
ij>

Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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


[jira] Updated: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-285?page=all ]

Kathey Marsden updated DERBY-285:
---------------------------------

    Comment: was deleted

> Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-285
>          URL: http://issues.apache.org/jira/browse/DERBY-285
>      Project: Derby
>         Type: Improvement
>   Components: Network Client
>     Versions: 10.1.0.0
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden
>  Attachments: derby285.diff
>
> If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.
> To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.
> Start network server
> java org.apache.derby.drda.NetworkServerControl start
> $ java org.apache.derby.tools.ij
> ij version 10.1
> ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
> ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
> ij>
> Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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


[jira] Updated: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-285?page=all ]

Kathey Marsden updated DERBY-285:
---------------------------------

    Fix Version: 10.1.1.1

> Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-285
>          URL: http://issues.apache.org/jira/browse/DERBY-285
>      Project: Derby
>         Type: Improvement

>   Components: Network Client
>     Versions: 10.1.1.0
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden
>      Fix For: 10.1.1.1
>  Attachments: derby285.diff
>
> If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.
> To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.
> Start network server
> java org.apache.derby.drda.NetworkServerControl start
> $ java org.apache.derby.tools.ij
> ij version 10.1
> ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
> ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
> ij>
> Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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


[jira] Resolved: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-285?page=all ]
     
Kathey Marsden resolved DERBY-285:
----------------------------------

    Resolution: Fixed

Fixed

Sending        java\drda\org\apache\derby\impl\drda\DRDAConnThread.java
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\badConnection.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\dataSourcePermissions_net.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\secureUsers.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\secureUsers1.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\users.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\users2.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\badConnection.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\dataSourcePermissions_net.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\netxaPositive.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\secureUsers.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\secureUsers1.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\testij.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\users.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\users2.out
Transmitting file data ...............
Committed revision 180107.



> Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-285
>          URL: http://issues.apache.org/jira/browse/DERBY-285
>      Project: Derby
>         Type: Improvement
>   Components: Network Client
>     Versions: 10.1.0.0
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden
>  Attachments: derby285.diff
>
> If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.
> To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.
> Start network server
> java org.apache.derby.drda.NetworkServerControl start
> $ java org.apache.derby.tools.ij
> ij version 10.1
> ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
> ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
> ij>
> Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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


[jira] Commented: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-285?page=comments#action_12312662 ] 

Kathey Marsden commented on DERBY-285:
--------------------------------------

The offending characters appear for severe error messages where the client cannot call the server to retrieve the message text. 

So my planned solution is to not send message arguments in the sqlerrmc for severe messages, but rather send the full message text localized according the the server locale.  This will make the error messages more readable and eliminate the offending characters.


> Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-285
>          URL: http://issues.apache.org/jira/browse/DERBY-285
>      Project: Derby
>         Type: Improvement
>   Components: Network Client
>     Versions: 10.1.0.0
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden

>
> If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.
> To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.
> Start network server
> java org.apache.derby.drda.NetworkServerControl start
> $ java org.apache.derby.tools.ij
> ij version 10.1
> ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
> ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
> ij>
> Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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


[jira] Assigned: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-285?page=all ]

Kathey Marsden reassigned DERBY-285:
------------------------------------

    Assign To: Kathey Marsden

> Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-285
>          URL: http://issues.apache.org/jira/browse/DERBY-285
>      Project: Derby
>         Type: Improvement
>   Components: Network Client
>     Versions: 10.1.0.0
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden

>
> If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.
> To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.
> Start network server
> java org.apache.derby.drda.NetworkServerControl start
> $ java org.apache.derby.tools.ij
> ij version 10.1
> ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
> ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
> ij>
> Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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


[jira] Closed: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-285?page=all ]
     
Kathey Marsden closed DERBY-285:
--------------------------------


Closing this issue. Some cases still remain where non-ascii characters print. This is filed as DERBY-958


> Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-285
>          URL: http://issues.apache.org/jira/browse/DERBY-285
>      Project: Derby
>         Type: Improvement

>   Components: Network Client
>     Versions: 10.1.1.0
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden
>      Fix For: 10.1.1.1
>  Attachments: derby285.diff
>
> If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.
> To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.
> Start network server
> java org.apache.derby.drda.NetworkServerControl start
> $ java org.apache.derby.tools.ij
> ij version 10.1
> ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
> ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
> ij>
> Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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


Re: [jira] Updated: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by Kathey Marsden <km...@sbcglobal.net>.
Kathey Marsden (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/DERBY-285?page=all ]
>
>Kathey Marsden updated DERBY-285:
>---------------------------------
>
>    Attachment: derby285.diff
>
>Fix for DERBY-285 Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
>
>This patch  changes network server to send the complete message in its own locale instead of just the message arguments and delimiters if the exception is severe enough to terminate the connection.     This will eliminate the special characters and provide a more readable message. 
>I also cleaned up the code a bit in this area.  I removed the extra logging for the severe exceptions as these will already be logged as part of the normal Derby error logging.
>
>
>
>  
>
I will commit this tomorrow morning but would appreciate a review before
or after checkin from anyone available to do it.

Thanks

Kathey




[jira] Updated: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-285?page=all ]

Kathey Marsden updated DERBY-285:
---------------------------------

    Attachment: derby285.diff

Fix for DERBY-285 Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

This patch  changes network server to send the complete message in its own locale instead of just the message arguments and delimiters if the exception is severe enough to terminate the connection.     This will eliminate the special characters and provide a more readable message. 
I also cleaned up the code a bit in this area.  I removed the extra logging for the severe exceptions as these will already be logged as part of the normal Derby error logging.







> Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-285
>          URL: http://issues.apache.org/jira/browse/DERBY-285
>      Project: Derby
>         Type: Improvement
>   Components: Network Client
>     Versions: 10.1.0.0
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden
>  Attachments: derby285.diff
>
> If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.
> To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.
> Start network server
> java org.apache.derby.drda.NetworkServerControl start
> $ java org.apache.derby.tools.ij
> ij version 10.1
> ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
> ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
> ij>
> Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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


[jira] Updated: (DERBY-285) Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-285?page=all ]

Kathey Marsden updated DERBY-285:
---------------------------------

    Attachment: derby285.diff

Rattaching patch after synching up with Dyre's change for DERBY-128.

Fix for DERBY-285 Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message

This patch  changes network server to send the complete message in its own locale instead of just the message arguments and delimiters if the exception is severe enough to terminate the connection.     This will eliminate the special characters and provide a more readable message. 
I also cleaned up the code a bit in this area.  I removed the extra logging for the severe exceptions as these will already be logged as part of the normal Derby error logging.


> Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-285
>          URL: http://issues.apache.org/jira/browse/DERBY-285
>      Project: Derby
>         Type: Improvement
>   Components: Network Client
>     Versions: 10.1.0.0
>     Reporter: Kathey Marsden
>     Assignee: Kathey Marsden
>  Attachments: derby285.diff
>
> If Network Client cannot connect to the database to retrieve an error message, it will print only the message tokens, the non-ascii token separators, and derby log location.  It would be good if at least the message could be formatted to present a better message to the user without the non-ascii characters.
> To reproduce try a database shutdown.  Because the database is shutdown, the client cannot retrieve the actual message from the server. It therefore just prints the tokens.
> Start network server
> java org.apache.derby.drda.NetworkServerControl start
> $ java org.apache.derby.tools.ij
> ij version 10.1
> ij> connect 'jdbc:derby://localhost:1527/wombat;create=true';
> ij> connect 'jdbc:derby://localhost:1527/wombat;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: wombat[]08006.D[]Database 'wombat' shutdown.[](server log:derby.log)
> ij>
> Note: The actual offending characters have been replaced in the output in this bug by []. This is because they break Jira XML retrieval!

-- 
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