JDBC Array double precision [] error - Mailing list pgsql-jdbc

From Juan Pablo Cook
Subject JDBC Array double precision [] error
Date
Msg-id CAKge45+Tmvu75UjHMtoAhuTnw_yCpkrgktt-kWT7ojPEu+W8gg@mail.gmail.com
Whole thread Raw
Responses Re: JDBC Array double precision [] error  (Nicholas White <n.j.white@gmail.com>)
List pgsql-jdbc
Hi everyone! I need your help with this problem.
 
I'm using PostgreSQL 9.2 Server & the latest jdbc driver: postgresql-9.2-1002.jdbc4.jar

I have a table with this column array: 
 -- histograma double precision[]

And I want to retrieve this and cast into java to double[] but I can't.

This is the extract of the code:

Statement stat1 = con.createStatement();
ResultSet rs1 = stat1.executeQuery("SELECT * FROM \"Vector\");

while (rs1.next()) {

double[] array = (double[]) rs1.getArray("histograma").getArray();

}

And the error: 
"
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: [Ljava.lang.Double; cannot be cast to [D
"
Also I tried to do a for loop but didn't work.

Can you help me? 

Thanks a lot! ;)

pgsql-jdbc by date:

Previous
From: Edson Richter
Date:
Subject: JDBC 9.2 DEV not working with Hex bytea output?
Next
From: Nicholas White
Date:
Subject: Re: JDBC Array double precision [] error