Fwd: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar

From: Michael musset <mickamusset(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Fwd: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar
Date: 2010-10-21 08:26:17
Message-ID: AANLkTi=mdoJ2J57szgp=t5JN_Swp-CPBkWyDUxqWifns@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

---------- Forwarded message ----------
From: Michael musset <mickamusset(at)gmail(dot)com>
Date: Thu, Oct 21, 2010 at 10:26 AM
Subject: Re: [JDBC] JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar
To: Kris Jurka <books(at)ejurka(dot)com>

Thank you very much, and about that :

Yes the bug appeared when I do an updaterow() to the resultset.

i've decided to migrate to postgresql 9.

will it work with JDBC4 Postgresql Driver, Version
9.0-801<http://jdbc.postgresql.org/download/postgresql-9.0-801.jdbc4.jar>?

thanks,

On Thu, Oct 21, 2010 at 10:21 AM, Kris Jurka <books(at)ejurka(dot)com> wrote:

>
>
> On Tue, 19 Oct 2010, Michael musset wrote:
>
> java.lang.ClassCastException: org.postgresql.jdbc4.Jdbc4SQLXML cannot be
>> cast to [B
>>
>> atorg.postgresql.jdbc2.AbstractJdbc2ResultSet.updateRowBuffer(AbstractJdbc2Re
>> sultSet.java:1729)
>>
>> atorg.postgresql.jdbc2.AbstractJdbc2ResultSet.updateRow(AbstractJdbc2ResultSe
>> t.java:1291)
>>
>>
>> SQLXML sqlxml = con.createSQLXML();
>> DOMResult domResult=sqlxml.setResult(DOMResult.class)
>> domResult.setNode(xmldocumentDOM);
>>
>> stmt.setSQLXML(1, sqlxml);
>> stmt.execute();
>>
>>
> Your sample code and stacktrace don't seem to match, but I see what the
> problem is. The updatable ResultSet code isn't prepared for handling a
> SQLXML object. It's slightly tricky to fix because the code in question is
> in a JDBC2 class while SQLXML is JDBC4 only. I'll look into it.
>
> Kris Jurka
>

--
Michael Musset,
Tel: 06 26 06 29 89

--
Michael Musset,
Tel: 06 26 06 29 89

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2010-10-21 12:57:03 Bug in DatabaseMetaData.getColumns() with columns based on domains
Previous Message Kris Jurka 2010-10-21 08:21:01 Re: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar