<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Sat May 25 19:09:59 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.couchbase.com/issues/si/jira.issueviews:issue-xml/JCBC-140/JCBC-140.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Couchbase</title>
    <link>http://www.couchbase.com/issues</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.4</version>
        <build-number>845</build-number>
        <build-date>26-12-2012</build-date>
    </build-info>

<item>
            <title>[JCBC-140] Code breaks when Connection URI is improper</title>
                <link>http://www.couchbase.com/issues/browse/JCBC-140</link>
                <project id="10080" key="JCBC">Couchbase Java Client</project>
                        <description>The code breaks abruptly when connection URI is not given in a proper format in the SDK client for connecting the to required Couchbase server.&lt;br/&gt;
For instance, when I am specifying the URI as &amp;quot;http:/10.3.2.57:8091/index.html&amp;quot; instead of &amp;quot;http:/10.3.2.57:8091/pools&amp;quot;, exception appears, &lt;br/&gt;
whereas a proper error message should be returned saying that &amp;#39;Connection could not be established to the requested server location&amp;#39;.&lt;br/&gt;
Please find attached the log file for the exception trace.</description>
                <environment>1939 - &amp;lt;manifest&amp;gt;&amp;lt;remote name=&amp;quot;couchbase&amp;quot; fetch=&amp;quot;&lt;a href=&quot;git://github.com/couchbase/&quot;&gt;git://github.com/couchbase/&lt;/a&gt;&amp;quot;/&amp;gt;&amp;lt;remote name=&amp;quot;membase&amp;quot; fetch=&amp;quot;&lt;a href=&quot;git://github.com/membase/&quot;&gt;git://github.com/membase/&lt;/a&gt;&amp;quot;/&amp;gt;&amp;lt;remote name=&amp;quot;apache&amp;quot; fetch=&amp;quot;&lt;a href=&quot;git://github.com/apache/&quot;&gt;git://github.com/apache/&lt;/a&gt;&amp;quot;/&amp;gt;&amp;lt;remote name=&amp;quot;erlang&amp;quot; fetch=&amp;quot;&lt;a href=&quot;git://github.com/erlang/&quot;&gt;git://github.com/erlang/&lt;/a&gt;&amp;quot;/&amp;gt;&amp;lt;default remote=&amp;quot;couchbase&amp;quot; revision=&amp;quot;master&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;tlm&amp;quot; path=&amp;quot;tlm&amp;quot; revision=&amp;quot;12abea946eafd7411273d18a10ae1f84390db3d4&amp;quot;&amp;gt;&amp;lt;copyfile src=&amp;quot;Makefile.top&amp;quot; dest=&amp;quot;Makefile&amp;quot;/&amp;gt;&amp;lt;/project&amp;gt;&amp;lt;project name=&amp;quot;bucket_engine&amp;quot; path=&amp;quot;bucket_engine&amp;quot; revision=&amp;quot;70b3624abc697b7d18bf3d57f331b7674544e1e7&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;ep-engine&amp;quot; path=&amp;quot;ep-engine&amp;quot; revision=&amp;quot;68e3f7c57ae40c42dcb94e4d282bbd1648f9adc0&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;libconflate&amp;quot; path=&amp;quot;libconflate&amp;quot; revision=&amp;quot;2cc8eff8e77d497d9f03a30fafaecb85280535d6&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;libmemcached&amp;quot; path=&amp;quot;libmemcached&amp;quot; revision=&amp;quot;ca739a890349ac36dc79447e37da7caa9ae819f5&amp;quot; remote=&amp;quot;membase&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;libvbucket&amp;quot; path=&amp;quot;libvbucket&amp;quot; revision=&amp;quot;00d3763593c116e8e5d97aa0b646c42885727398&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;membase-cli&amp;quot; path=&amp;quot;membase-cli&amp;quot; revision=&amp;quot;7fe4121e7e83952a4cb032e25a2cb9fca1709354&amp;quot; remote=&amp;quot;membase&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;memcached&amp;quot; path=&amp;quot;memcached&amp;quot; revision=&amp;quot;7ea975a93a0231393502af4ca98976eee8a83386&amp;quot; remote=&amp;quot;membase&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;moxi&amp;quot; path=&amp;quot;moxi&amp;quot; revision=&amp;quot;52a5fa887bfff0bf719c4ee5f29634dd8707500e&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;ns_server&amp;quot; path=&amp;quot;ns_server&amp;quot; revision=&amp;quot;315aa6af297d7139c505e2fa9aa31dd429615a7d&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;portsigar&amp;quot; path=&amp;quot;portsigar&amp;quot; revision=&amp;quot;1bc865e1622fb93a3fe0d1a4cdf18eb97ed9d600&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;sigar&amp;quot; path=&amp;quot;sigar&amp;quot; revision=&amp;quot;63a3cd1b316d2d4aa6dd31ce8fc66101b983e0b0&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;couchbase-examples&amp;quot; path=&amp;quot;couchbase-examples&amp;quot; revision=&amp;quot;544688dc56420faaf6f25946dd4b3ef3f7c15286&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;couchbase-python-client&amp;quot; path=&amp;quot;couchbase-python-client&amp;quot; revision=&amp;quot;006c1aa8b76f6bce11109af8a309133b57079c4c&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;couchdb&amp;quot; path=&amp;quot;couchdb&amp;quot; revision=&amp;quot;b68b5f40e0911db7de651b457e6a79a5937ff810&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;couchdbx-app&amp;quot; path=&amp;quot;couchdbx-app&amp;quot; revision=&amp;quot;1130fa3c1f117527b761497cfa0c15a1e9968808&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;couchstore&amp;quot; path=&amp;quot;couchstore&amp;quot; revision=&amp;quot;b5937c4479bf05dcc67264efe19abaf52870a127&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;geocouch&amp;quot; path=&amp;quot;geocouch&amp;quot; revision=&amp;quot;849d5443689b1924f097548af864c539bffcc929&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;mccouch&amp;quot; path=&amp;quot;mccouch&amp;quot; revision=&amp;quot;88701cc326bc3dde4ed072bb8441be83adcfb2a5&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;testrunner&amp;quot; path=&amp;quot;testrunner&amp;quot; revision=&amp;quot;c4e82c929b3c7f2328f234fc9d79b38868268455&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;otp&amp;quot; path=&amp;quot;otp&amp;quot; revision=&amp;quot;b6dc1a844eab061d0a7153d46e7e68296f15a504&amp;quot; remote=&amp;quot;erlang&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;icu4c&amp;quot; path=&amp;quot;icu4c&amp;quot; revision=&amp;quot;26359393672c378f41f2103a8699c4357c894be7&amp;quot; remote=&amp;quot;couchbase&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;snappy&amp;quot; path=&amp;quot;snappy&amp;quot; revision=&amp;quot;5681dde156e9d07adbeeab79666c9a9d7a10ec95&amp;quot; remote=&amp;quot;couchbase&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;v8&amp;quot; path=&amp;quot;v8&amp;quot; revision=&amp;quot;447decb75060a106131ab4de934bcc374648e7f2&amp;quot; remote=&amp;quot;couchbase&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;gperftools&amp;quot; path=&amp;quot;gperftools&amp;quot; revision=&amp;quot;8f60ba949fb8576c530ef4be148bff97106ddc59&amp;quot; remote=&amp;quot;couchbase&amp;quot;/&amp;gt;&amp;lt;project name=&amp;quot;pysqlite&amp;quot; path=&amp;quot;pysqlite&amp;quot; revision=&amp;quot;0ff6e32ea05037fddef1eb41a648f2a2141009ea&amp;quot; remote=&amp;quot;couchbase&amp;quot;/&amp;gt;&amp;lt;/manifest&amp;gt;</environment>
            <key id="20598">JCBC-140</key>
            <summary>Code breaks when Connection URI is improper</summary>
                <type id="4" iconUrl="http://www.couchbase.com/issues/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.couchbase.com/issues/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.couchbase.com/issues/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10011">Public</security>
                        <assignee username="deeptida">Deepti Dawar</assignee>
                                <reporter username="deeptida">Deepti Dawar</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Nov 2012 03:18:54 -0600</created>
                <updated>Thu, 24 Jan 2013 23:46:37 -0600</updated>
                    <resolved>Tue, 15 Jan 2013 11:45:02 -0600</resolved>
                            <version>1.1-dp3</version>
                                <fixVersion>1.1.1</fixVersion>
                                <component>library</component>
                                <votes>0</votes>
                        <watches>0</watches>
                                                    <comments>
                    <comment id="43541" author="daschl" created="Thu, 8 Nov 2012 03:33:02 -0600"  >Deepti,&lt;br/&gt;
&lt;br/&gt;
I think the logs already provide a helpful error message with the stack trace that shows what it tried to parse.&lt;br/&gt;
&lt;br/&gt;
In the case you provided, the logs would say 2012-11-08 10:29:09.254 WARN com.couchbase.client.vbucket.ConfigurationProviderHTTP:  Provided URI &lt;a href=&quot;http://192.168.1.105:8091/index.html&quot;&gt;http://192.168.1.105:8091/index.html&lt;/a&gt; has an unparsable response...skipping&lt;br/&gt;
&lt;br/&gt;
and then print a stack trace of what was tried to parse (in this case hughe chunks of HTML).&lt;br/&gt;
&lt;br/&gt;
Also, if you pass in more URIs it would try to get the next one to establish a successful connection.&lt;br/&gt;
&lt;br/&gt;
I think we could catch it and add a different error message, but then it wont be clear to the user what happened.&lt;br/&gt;
&lt;br/&gt;
If you think we really should change something here, please reopen the issue and then we can discuss it together at a broader audience!&lt;br/&gt;
&lt;br/&gt;
Thanks,&lt;br/&gt;
Michael</comment>
                    <comment id="43546" author="deeptida" created="Thu, 8 Nov 2012 04:44:26 -0600"  >Dear Michael,&lt;br/&gt;
&lt;br/&gt;
As discussed with you, I think the exception here should be caught in a very generic manner that gives the user some information like this - &amp;quot;Connection could not be established - Either the URI provided is incorrect or the host is unavailable&amp;quot;. As the user is not concerned about what is happening beyond the scene and not in the least about what is getting parsed in order for the connection to be established. He is just concerned about the system URL he wants to connect to and the network. Either of these two if unavailable with cause an issue in connection, only that needs to be highlighted back to the user in form of a warning message. It should not abruptly break the code. Hence, I am reopening this defect for further investigation.&lt;br/&gt;
&lt;br/&gt;
Regards,&lt;br/&gt;
Deepti</comment>
                    <comment id="46574" author="deeptida" created="Wed, 26 Dec 2012 05:20:52 -0600"  >File changed.&lt;br/&gt;
Please approve for check in.</comment>
                    <comment id="46837" author="deeptida" created="Wed, 2 Jan 2013 03:55:50 -0600"  >Hi Michael,&lt;br/&gt;
&lt;br/&gt;
Please review at &lt;br/&gt;
&lt;br/&gt;
&lt;a href=&quot;http://review.couchbase.org/#/c/23648/2&quot;&gt;http://review.couchbase.org/#/c/23648/2&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
Regards,&lt;br/&gt;
Deepti</comment>
                    <comment id="46946" author="mnunberg" created="Wed, 2 Jan 2013 20:13:04 -0600"  >I think this should be converted to some kind of connection or execution exception, providing more detailed information.</comment>
                    <comment id="47280" author="deeptida" created="Tue, 8 Jan 2013 09:22:43 -0600"  >Mark, can we have any exceptions like DisplayableException which could be shown to the end user ?&lt;br/&gt;
&lt;br/&gt;
Can you please give details about the connection or execution exceptions.</comment>
                    <comment id="47287" author="mnunberg" created="Tue, 8 Jan 2013 12:12:14 -0600"  >What is displayed to the user is a sub-component of logging and not of the exception itself. An exception is not an exception unless it represents an exceptional condition; it is up to the code catching the exception to convert this to something the user can understand.&lt;br/&gt;
&lt;br/&gt;
I am not sure if the Couchbase Java client has classes for &amp;quot;connection&amp;quot; exceptions which indicate a difficulty in communication between client and server, but if there isn&amp;#39;t such a class then it should be created.&lt;br/&gt;
&lt;br/&gt;
Theroetically&lt;br/&gt;
&lt;br/&gt;
class CouchbaseConnectionException extends Exception {&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;....&lt;br/&gt;
}&lt;br/&gt;
&lt;br/&gt;
Typically it seems most of the Couchbase exceptions in the Java client are RuntimeExceptions or ExecutionExceptions (i.e. generic &amp;quot;unchecked&amp;quot; exceptions).&lt;br/&gt;
&lt;br/&gt;
Matt and Michale might have more knowledge of the various classes contained therein and their suitability of use.</comment>
                    <comment id="47356" author="deeptida" created="Wed, 9 Jan 2013 05:02:51 -0600"  >I agree. There should be in-house exception classes meant to facilitate this purpose.&lt;br/&gt;
A user working with couchbase sdk, should have the feasibility of using those exception classes for understanding various scenarios and then acting accordingly.&lt;br/&gt;
&lt;br/&gt;
Please let us know if there are any exception classes for communicating the connection exception to the user in which we can embed a custom message stating what happened. </comment>
                    <comment id="47764" author="deeptida" created="Tue, 15 Jan 2013 06:36:15 -0600"  >Please review at &lt;br/&gt;
&lt;br/&gt;
&lt;a href=&quot;http://review.couchbase.org/#/c/23648/&quot;&gt;http://review.couchbase.org/#/c/23648/&lt;/a&gt;</comment>
                    <comment id="47786" author="deeptida" created="Tue, 15 Jan 2013 11:45:02 -0600"  >Changes checked in for review in gerrit.</comment>
                </comments>
                    <attachments>
                    <attachment id="16066" name="ConfigurationParserJSON.java" size="5996" author="deeptida" created="Wed, 26 Dec 2012 05:20:52 -0600" />
                    <attachment id="15736" name="couchbase_SDK_connect_exception.odt" size="29784" author="deeptida" created="Wed, 7 Nov 2012 03:18:54 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                                                                                                                                                    <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>9494</customfieldvalue>
                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10181" key="com.atlassian.jira.ext.charting:timeinstatus">
                <customfieldname>Time In Status</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                </customfields>
    </item>
</channel>
</rss>