[
https://issues.apache.org/jira/browse/CASSANDRA-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060598#comment-13060598
]
Hudson commented on CASSANDRA-2746:
-----------------------------------
Integrated in Cassandra-0.8 #206 (See
[https://builds.apache.org/job/Cassandra-0.8/206/])
add initCause to cliclient exceptions
patch by Jackson Chung; reviewed by jbellis for CASSANDRA-2746
jbellis :
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1143397
Files :
*
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java
> CliClient does not log root cause exception when catch it from
> executeCLIStatement
> ----------------------------------------------------------------------------------
>
> Key: CASSANDRA-2746
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2746
> Project: Cassandra
> Issue Type: Bug
> Components: Tools
> Reporter: Jackson Chung
> Assignee: Jackson Chung
> Priority: Trivial
> Fix For: 0.8.2
>
> Attachments: patch2746.txt
>
>
> When executing a statement from the cassandra-cli (with --debug) , if an
> exception is thrown from one of the cases in side the executeCLIStatement
> method, the root cause is swallowed. For specific case such as the
> InvalidRequestException or the SchemaDisagreementException, just the message
> itself maybe enough, but for the general Exception case, without the root
> cause, it could be difficult to debug the issue.
> For example, we have seen exception like:
> {noformat}
> null
> java.lang.RuntimeException
> at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:209)
> at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:223)
> at org.apache.cassandra.cli.CliMain.main(CliMain.java:351)
> {noformat}
> the null there would most likely indicate this is a NPE (though it could
> still be any Exception with null message). By adding a initCause to the
> caught exception, we could see the root cause, eg:
> {noformat}
> null
> java.lang.RuntimeException
> at
> org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:212)
> at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:223)
> at org.apache.cassandra.cli.CliMain.main(CliMain.java:351)
> Caused by: java.lang.NullPointerException
> at
> org.apache.cassandra.cli.CliClient.describeKeySpace(CliClient.java:1336)
> at
> org.apache.cassandra.cli.CliClient.executeShowKeySpaces(CliClient.java:1166)
> at
> org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:170)
> ... 2 more
> {noformat}
> submitting a patch here that would add the initCause to all caught exceptions
> here. But the most important one is the general Exception case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira