<!--
RSS generated by JIRA (4.4#649-r158309) at Sat May 25 16:33:34 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://dev.clojure.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+JDBC+AND+created%3E%3D-1w+ORDER+BY+created+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+JDBC+AND+created%3E%3D-1w+ORDER+BY+created+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="1" total="1"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[JDBC-58] get-connection returns an error</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-58</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;My db-spec is:&lt;br/&gt;
(def db-spec {:classname &quot;org.postgresql.Driver&quot;&lt;br/&gt;
              :subprotocol &quot;postgresql&quot;&lt;br/&gt;
              :subname &quot;sd_ventures_development&quot;&lt;br/&gt;
              :user &quot;sd_ventures&quot;&lt;br/&gt;
              :password &quot;&quot;})&lt;/p&gt;

&lt;p&gt;When I query using the old API:&lt;br/&gt;
(defn get-devices []&lt;br/&gt;
  (jdbc/with-connection db-spec&lt;br/&gt;
    (jdbc/with-query-results rs &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;SELECT * FROM devices&amp;quot;&amp;#93;&lt;/span&gt;&lt;br/&gt;
      (doall rs))))&lt;/p&gt;

&lt;p&gt;it works and I get the list of devices.&lt;/p&gt;

&lt;p&gt;With the new API -&lt;br/&gt;
(defn get-devices []&lt;br/&gt;
  (let &lt;span class=&quot;error&quot;&gt;&amp;#91;conn (jdbc/get-connection db-spec)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    (jdbc/query conn &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;SELECT * FROM devices&amp;quot;&amp;#93;&lt;/span&gt;)))&lt;br/&gt;
it returns an error:&lt;br/&gt;
Exception: java.lang.IllegalArgumentException: db-spec org.postgresql.jdbc4.Jdbc4Connection@4c54daa9 is missing a required parameter&lt;br/&gt;
                       jdbc.clj:221 clojure.java.jdbc/get-connection&lt;br/&gt;
                       jdbc.clj:628 clojure.java.jdbc/db-with-query-results*&lt;/p&gt;


&lt;p&gt;I am completely bowled over by this error. I checked the source code. It should never reach that statement in get-connection because I am supplying both subname and subprotocol.&lt;/p&gt;
</description>
                <environment>PostgreSQL</environment>
            <key id="16200">JDBC-58</key>
            <summary>get-connection returns an error</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="rohshall">Salil Wadnerkar</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 May 2013 11:05:10 -0500</created>
                <updated>Fri, 24 May 2013 11:10:12 -0500</updated>
                    <resolved>Fri, 24 May 2013 11:10:12 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31145" author="seancorfield" created="Fri, 24 May 2013 11:10:12 -0500"  >&lt;p&gt;Not a bug. You are using the API incorrectly. query takes a db-spec NOT a connection:&lt;/p&gt;

&lt;p&gt;    (jdbc/query db-spec &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;SELECT * FROM devices&amp;quot;&amp;#93;&lt;/span&gt;)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>