Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5gu8-0005rW-Fo for pgsql-jdbc@arkaria.postgresql.org; Thu, 05 Sep 2019 01:49:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i5gt9-0002oN-7U for pgsql-jdbc@arkaria.postgresql.org; Thu, 05 Sep 2019 01:48:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5gt8-0002kp-HC for pgsql-jdbc@lists.postgresql.org; Thu, 05 Sep 2019 01:48:43 +0000 Received: from sonic313-15.consmr.mail.bf2.yahoo.com ([74.6.133.125]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5gt5-00030D-7c for pgsql-jdbc@lists.postgresql.org; Thu, 05 Sep 2019 01:48:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1567648115; bh=ZvNrLKy+n6NNnMfpLKUX5hNyKlvfMfzEJMTA/7SLGbA=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=ZzFnK/9PAeojTfoHSlTdjBlwzav0aoe56Oz1/UatmMb5ceQUGBAIRLK1kdoQbJCEurqih54kJz2epWJn68qSKkTRnLQHrD6/1lQ6j9AmJs2yNZNisKQGaEzfALP5/2f4z2jnVPMLCUd0gIi6yThRg5MMXe5zLTnNaFIOGdJ+fEE/tRIX0wiJjlIAIYgDD+Ibah3Z6vCYmv73EtCoktlN/UjgMQGV6S513s8TyOdpNhasBpnTVf4COidBlxvS5M1I45CEwaleCezOOFk8hFmwRsDchfgC1LOJToFExktMf54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2pqH_mTF NfT1LzFg8xoMJymwDN8rZ9.jXdaJcCW5s4Sj5iTZUlke6ljHJEmeOB_7qwhH.lUflkGgTiEhUHzv 5icW27p8QQoJ4ZlEEB33cbhT1uOEemLOmz57sN9E_sHbk5qi76qhaLIQVtmSjwLfZlWq1BmK7Mha a8EEXGDlXmjOkngWdDLwRcG2fBtN3P1ohDuPjcOipzpg8Z9PSmSIFGQLhlODwul8eWCvTZbl98w. 6bbkXtdV8wCuiUbuWqL5P4j8pwRnpLWX.A_fQZYMZzXruHngYAcKmvn5XpoE0aZ6vXPtj23v5GJ7 Y_hDIXu31GlmrDBYlmr0Hi67PdKWmlHUtlMqPcN4OPlrNgcTF.A-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.bf2.yahoo.com with HTTP; Thu, 5 Sep 2019 01:48:35 +0000 Date: Thu, 5 Sep 2019 01:48:29 +0000 (UTC) From: Karen Goh To: Rob Sargent , rob stone Cc: , Mark Rotteveel Message-ID: <522221901.1676873.1567648109451@mail.yahoo.com> In-Reply-To: <1EC7278E-6842-4269-BCED-4238EFFF6562@gmail.com> References: <932079842.712590.1567405714491@mail.yahoo.com> <58285538-686D-45F6-B5A5-883DBE7D0C10@gmail.com> <1422030722.958511.1567487705474@mail.yahoo.com> <1ACDE5B3-3F0E-4BF0-8C37-DAD09F35F30C@gmail.com> <860006402.1322813.1567568281784@mail.yahoo.com> <1829430979.1362196.1567576711470@mail.yahoo.com> <8b79560c-3108-af04-e74f-f4fb55aa0624@lawinegevaar.nl> <1705600642.1365952.1567582413285@mail.yahoo.com> <9b008bfa3107e8a3f7505b6f300237d1e13eff7f.camel@gmail.com> <1EC7278E-6842-4269-BCED-4238EFFF6562@gmail.com> Subject: Re: how to resolve org.postgresql.util.PSQLException: ResultSet not positioned properly, perhaps you need to call next. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1676872_1687969691.1567648109450" X-Mailer: WebService/1.1.14303 YahooMailIosMobile Yahoo%20Mail/46873 CFNetwork/978.0.7 Darwin/18.6.0 Content-Length: 11438 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_1676872_1687969691.1567648109450 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Not at all. As mentioned, I could print out the queried subectNames, at the= ide and at the database. But, I can=E2=80=99t anymore. However, I need to deal with Tomcat problem first to give me a real reflect= ion of my code error. Sent from Yahoo Mail for iPhone On Thursday, September 5, 2019, 12:39 AM, Rob Sargent wrote: As I said last time, I'm not an "expert". subjectNames is declared as an array. In your "for" loop you will be doing ps2.setArray(2, array); multiple times depending on the number of subjects contained in subjectNames. I suspect the query is failing and as there is no try .. catch block to trap the SQLException, this is not reported back to your code. If you alter the postgresql.conf to log all SQL statements, restart, run your test again, look in the log file, it will show the passed parameter values. You can then verify that that the array passed as the second parameter is correct. HTH, Robert Relieved am I that other=E2=80=99s could see that I was not doubting the OP= wrote the code in question. =C2=A0I do consider myself a Java programmer (= expert is a trickier question). We do need to see the entire routine (I think that might be doPost()). =C2= =A0If that=E2=80=99s more than 100 lines I suggest a refactor first. Have t= he doPost() call a method which does nothing but the desired interaction.= =C2=A0 ------=_Part_1676872_1687969691.1567648109450 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Not at all. As mentioned, I could print out the queried subectNames, at the= ide and at the database. But, I can=E2=80=99t anymore.

= However, I need to deal with Tomcat problem first to give me a real reflect= ion of my code error.


Sent from Yahoo Mail for iPhone

On Thursday, September 5, 2019, 12:39 AM, Rob Sargent <ro= bjsargent@gmail.com> wrote:


= As I said last time, I'm not= an "expert".

subjectNames is declared as an array.=

ti= mes depending on the number of subjects contained in subjectNames.
I suspect the query is failing and as there is no try .. ca= tch block to
trap the SQLException, this is not reported back to your code= .

If you alter the postgresql.conf to log all SQL s= tatements, restart,
run your test again, look in the log file, it will sh= ow the passed
parameter values. You can then verify that that the array pa= ssed as the
second parameter is correct.

HTH,
Rob= ert
Relieved am I that other=E2=80=99s= could see that I was not doubting the OP wrote the code in question.  = ;I do consider myself a Java programmer (expert is a trickier question).
=
We do need to see the entire routine (I think = that might be doPost()).  If that=E2=80=99s more than 100 lines I sugg= est a refactor first. Have the doPost() call a method which does nothing bu= t the desired interaction. 
= ------=_Part_1676872_1687969691.1567648109450--