Re: Fwd: JDBC Array double precision [] error - Mailing list pgsql-general

From Hannes Erven
Subject Re: Fwd: JDBC Array double precision [] error
Date
Msg-id 5158BAE4.7080701@erven.at
Whole thread Raw
In response to Fwd: JDBC Array double precision [] error  (Juan Pablo Cook <juampick@gmail.com>)
Responses Re: Fwd: JDBC Array double precision [] error
List pgsql-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


pgsql-general by date:

Previous
From: Lee Hachadoorian
Date:
Subject: Current Schema for Functions called within other Functions
Next
From: Gavan Schneider
Date:
Subject: Re: Money casting too liberal?