From: Hannes Erven <hannes@erven.at>
To: pgsql-general@postgresql.org
Cc: juampick@gmail.com
Subject: Re: Fwd: JDBC Array double precision [] error
Date: Mon, 01 Apr 2013 00:38:28 +0200
Message-ID: <5158BAE4.7080701@erven.at> (raw)
In-Reply-To: <CAKge45+cZpDVsGoYPdVew0haNs9mpq_i-qegaBKxnWDCiKQagQ@mail.gmail.com>
References: <CAKge45+Tmvu75UjHMtoAhuTnw_yCpkrgktt-kWT7ojPEu+W8gg@mail.gmail.com>
<CAKge45+cZpDVsGoYPdVew0haNs9mpq_i-qegaBKxnWDCiKQagQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Hi Juan Pablo,
> double[] array = (double[]) rs1.getArray("histograma").getArray();
> java.lang.ClassCastException: [Ljava.lang.Double; cannot be cast to [D
The error message already tells you the solution: use Double, not double.
Like this:
Double[] array = (Double[]) rs1.getArray("histograma").getArray();
Best regards,
-hannes
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: hannes@erven.at, pgsql-general@postgresql.org, juampick@gmail.com
Subject: Re: Fwd: JDBC Array double precision [] error
In-Reply-To: <5158BAE4.7080701@erven.at>
References: <CAKge45+Tmvu75UjHMtoAhuTnw_yCpkrgktt-kWT7ojPEu+W8gg@mail.gmail.com> <CAKge45+cZpDVsGoYPdVew0haNs9mpq_i-qegaBKxnWDCiKQagQ@mail.gmail.com> <5158BAE4.7080701@erven.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox