[jira] [Commented] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
[
https://issues.apache.org/jira/browse/DERBY-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117831#comment-13117831
]
Dag H. Wanvik commented on DERBY-5413:
--
Reverted the patch on trunk and 10.8 branch @ svn 1177482 and 1177483. Sorry
for the noise.
> NetworkServerControl#main can exit with status 1 without printing an error
> message to console
> -
>
> Key: DERBY-5413
> URL: https://issues.apache.org/jira/browse/DERBY-5413
> Project: Derby
> Issue Type: Bug
> Components: Network Server
>Affects Versions: 10.8.1.2
>Reporter: Dag H. Wanvik
>Assignee: Dag H. Wanvik
> Fix For: 10.8.2.2, 10.9.0.0
>
> Attachments: derby-5413.diff
>
>
> Cf this piece of code in main
> catch (Exception e)
> {
> //if there was an error, exit(1)
> if ((e.getMessage() == null) ||
> !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
> printErrors
> )
> {
> if (server != null)
> server.consoleExceptionPrint(e);
> else
> e.printStackTrace(); // default output stream is System.out
> }
> // else, we've already printed a trace, so just exit.
> System.exit(1);
> The call "server.consoleExceptionPrint(e)" will actually *not* print anything
> unless the debug flag "NetworkServerControlImpl#debugOutput" has ben set to
> true which it isn't a priori.
> I think it should be replaced by a call to
> server.consoleExceptionPrintTrace(e), which will print unconditionally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
[
https://issues.apache.org/jira/browse/DERBY-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117825#comment-13117825
]
Dag H. Wanvik commented on DERBY-5413:
--
I think I'll need to revert this change. I must have missed an error in my
regressions. It turns out tools/derbyrunjartest.java breaks with this patch:
> Fri Sep 30 01:56:07 GMT+01:00 2011 : DRDA_NoCommand.U:No command given.
> java.lang.Exception: DRDA_NoCommand.U:No command given.
Test Failed.
The logic in the server is confusing. It turns out the extra message above
comes from my patch. When the server analyzes incorrect commands in
derbyrunjartest, the serves prints a usage legend while inside
NetwrokControlServerImpl. Since *something* has already been printed, the above
exception is suppressed by default. "server.consoleExceptionPrint(e)" does
nothing unless a debug flag is on - contrary to its name if I may add, hence
confusing...
The reason I wanted to make sure we printed unconditionally was code added for
DERBY-5363 which, if it saw an error, had printed *nothing* at this point in
the code. I'll let that code handle its own exception printing instead, and
back this patch out. Note, the server can still die silently if an exception
with string NetworkServerControlImpl.UNEXPECTED_ERR, but this would be a coding
error I presume.
> NetworkServerControl#main can exit with status 1 without printing an error
> message to console
> -
>
> Key: DERBY-5413
> URL: https://issues.apache.org/jira/browse/DERBY-5413
> Project: Derby
> Issue Type: Bug
> Components: Network Server
>Affects Versions: 10.8.1.2
>Reporter: Dag H. Wanvik
>Assignee: Dag H. Wanvik
> Fix For: 10.8.2.2, 10.9.0.0
>
> Attachments: derby-5413.diff
>
>
> Cf this piece of code in main
> catch (Exception e)
> {
> //if there was an error, exit(1)
> if ((e.getMessage() == null) ||
> !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
> printErrors
> )
> {
> if (server != null)
> server.consoleExceptionPrint(e);
> else
> e.printStackTrace(); // default output stream is System.out
> }
> // else, we've already printed a trace, so just exit.
> System.exit(1);
> The call "server.consoleExceptionPrint(e)" will actually *not* print anything
> unless the debug flag "NetworkServerControlImpl#debugOutput" has ben set to
> true which it isn't a priori.
> I think it should be replaced by a call to
> server.consoleExceptionPrintTrace(e), which will print unconditionally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
[
https://issues.apache.org/jira/browse/DERBY-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117425#comment-13117425
]
Dag H. Wanvik commented on DERBY-5413:
--
Backported and committed on 10.8 as svn 1177352, closing.
Note: I saw during my commit that a change was made to the mergeproperties of
NetCursor.java even though I had made no changes to that file:
Property changes on: java/client/org/apache/derby/client/net/NetCursor.java
___
Modified: svn:mergeinfo
Merged
/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java:r1177324
Does anyone know why this happens? I see in its mergeinfo patches have been
merged from 10.7 branch as well..
> NetworkServerControl#main can exit with status 1 without printing an error
> message to console
> -
>
> Key: DERBY-5413
> URL: https://issues.apache.org/jira/browse/DERBY-5413
> Project: Derby
> Issue Type: Bug
> Components: Network Server
>Affects Versions: 10.8.1.2
>Reporter: Dag H. Wanvik
>Assignee: Dag H. Wanvik
> Fix For: 10.8.2.2, 10.9.0.0
>
> Attachments: derby-5413.diff
>
>
> Cf this piece of code in main
> catch (Exception e)
> {
> //if there was an error, exit(1)
> if ((e.getMessage() == null) ||
> !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
> printErrors
> )
> {
> if (server != null)
> server.consoleExceptionPrint(e);
> else
> e.printStackTrace(); // default output stream is System.out
> }
> // else, we've already printed a trace, so just exit.
> System.exit(1);
> The call "server.consoleExceptionPrint(e)" will actually *not* print anything
> unless the debug flag "NetworkServerControlImpl#debugOutput" has ben set to
> true which it isn't a priori.
> I think it should be replaced by a call to
> server.consoleExceptionPrintTrace(e), which will print unconditionally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
[
https://issues.apache.org/jira/browse/DERBY-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117407#comment-13117407
]
Dag H. Wanvik commented on DERBY-5413:
--
Yes, Myrna, I think so. I am actually in the process of doing it right now :)
> NetworkServerControl#main can exit with status 1 without printing an error
> message to console
> -
>
> Key: DERBY-5413
> URL: https://issues.apache.org/jira/browse/DERBY-5413
> Project: Derby
> Issue Type: Bug
> Components: Network Server
>Affects Versions: 10.8.1.2
>Reporter: Dag H. Wanvik
>Assignee: Dag H. Wanvik
> Fix For: 10.9.0.0
>
> Attachments: derby-5413.diff
>
>
> Cf this piece of code in main
> catch (Exception e)
> {
> //if there was an error, exit(1)
> if ((e.getMessage() == null) ||
> !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
> printErrors
> )
> {
> if (server != null)
> server.consoleExceptionPrint(e);
> else
> e.printStackTrace(); // default output stream is System.out
> }
> // else, we've already printed a trace, so just exit.
> System.exit(1);
> The call "server.consoleExceptionPrint(e)" will actually *not* print anything
> unless the debug flag "NetworkServerControlImpl#debugOutput" has ben set to
> true which it isn't a priori.
> I think it should be replaced by a call to
> server.consoleExceptionPrintTrace(e), which will print unconditionally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
[
https://issues.apache.org/jira/browse/DERBY-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117362#comment-13117362
]
Myrna van Lunteren commented on DERBY-5413:
---
Is this suitable for backport to 10.8?
> NetworkServerControl#main can exit with status 1 without printing an error
> message to console
> -
>
> Key: DERBY-5413
> URL: https://issues.apache.org/jira/browse/DERBY-5413
> Project: Derby
> Issue Type: Bug
> Components: Network Server
>Affects Versions: 10.8.1.2
>Reporter: Dag H. Wanvik
>Assignee: Dag H. Wanvik
> Fix For: 10.9.0.0
>
> Attachments: derby-5413.diff
>
>
> Cf this piece of code in main
> catch (Exception e)
> {
> //if there was an error, exit(1)
> if ((e.getMessage() == null) ||
> !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
> printErrors
> )
> {
> if (server != null)
> server.consoleExceptionPrint(e);
> else
> e.printStackTrace(); // default output stream is System.out
> }
> // else, we've already printed a trace, so just exit.
> System.exit(1);
> The call "server.consoleExceptionPrint(e)" will actually *not* print anything
> unless the debug flag "NetworkServerControlImpl#debugOutput" has ben set to
> true which it isn't a priori.
> I think it should be replaced by a call to
> server.consoleExceptionPrintTrace(e), which will print unconditionally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
[
https://issues.apache.org/jira/browse/DERBY-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117333#comment-13117333
]
Dag H. Wanvik commented on DERBY-5413:
--
Committed as svn 1177324 on trunk.
> NetworkServerControl#main can exit with status 1 without printing an error
> message to console
> -
>
> Key: DERBY-5413
> URL: https://issues.apache.org/jira/browse/DERBY-5413
> Project: Derby
> Issue Type: Bug
> Components: Network Server
>Reporter: Dag H. Wanvik
>Assignee: Dag H. Wanvik
> Attachments: derby-5413.diff
>
>
> Cf this piece of code in main
> catch (Exception e)
> {
> //if there was an error, exit(1)
> if ((e.getMessage() == null) ||
> !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
> printErrors
> )
> {
> if (server != null)
> server.consoleExceptionPrint(e);
> else
> e.printStackTrace(); // default output stream is System.out
> }
> // else, we've already printed a trace, so just exit.
> System.exit(1);
> The call "server.consoleExceptionPrint(e)" will actually *not* print anything
> unless the debug flag "NetworkServerControlImpl#debugOutput" has ben set to
> true which it isn't a priori.
> I think it should be replaced by a call to
> server.consoleExceptionPrintTrace(e), which will print unconditionally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
[
https://issues.apache.org/jira/browse/DERBY-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117114#comment-13117114
]
Knut Anders Hatlen commented on DERBY-5413:
---
Looks like a good improvement. +1
> NetworkServerControl#main can exit with status 1 without printing an error
> message to console
> -
>
> Key: DERBY-5413
> URL: https://issues.apache.org/jira/browse/DERBY-5413
> Project: Derby
> Issue Type: Bug
> Components: Network Server
>Reporter: Dag H. Wanvik
>Assignee: Dag H. Wanvik
> Attachments: derby-5413.diff
>
>
> Cf this piece of code in main
> catch (Exception e)
> {
> //if there was an error, exit(1)
> if ((e.getMessage() == null) ||
> !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
> printErrors
> )
> {
> if (server != null)
> server.consoleExceptionPrint(e);
> else
> e.printStackTrace(); // default output stream is System.out
> }
> // else, we've already printed a trace, so just exit.
> System.exit(1);
> The call "server.consoleExceptionPrint(e)" will actually *not* print anything
> unless the debug flag "NetworkServerControlImpl#debugOutput" has ben set to
> true which it isn't a priori.
> I think it should be replaced by a call to
> server.consoleExceptionPrintTrace(e), which will print unconditionally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
[
https://issues.apache.org/jira/browse/DERBY-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116909#comment-13116909
]
Dag H. Wanvik commented on DERBY-5413:
--
If there are no comments on this patch, I will commit it over the week-end.
> NetworkServerControl#main can exit with status 1 without printing an error
> message to console
> -
>
> Key: DERBY-5413
> URL: https://issues.apache.org/jira/browse/DERBY-5413
> Project: Derby
> Issue Type: Bug
> Components: Network Server
>Reporter: Dag H. Wanvik
>Assignee: Dag H. Wanvik
> Attachments: derby-5413.diff
>
>
> Cf this piece of code in main
> catch (Exception e)
> {
> //if there was an error, exit(1)
> if ((e.getMessage() == null) ||
> !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
> printErrors
> )
> {
> if (server != null)
> server.consoleExceptionPrint(e);
> else
> e.printStackTrace(); // default output stream is System.out
> }
> // else, we've already printed a trace, so just exit.
> System.exit(1);
> The call "server.consoleExceptionPrint(e)" will actually *not* print anything
> unless the debug flag "NetworkServerControlImpl#debugOutput" has ben set to
> true which it isn't a priori.
> I think it should be replaced by a call to
> server.consoleExceptionPrintTrace(e), which will print unconditionally.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
