Re: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar
Date
Msg-id alpine.BSO.2.00.1010210418110.30447@leary.csoft.net
Whole thread Raw
In response to JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar  (Michael musset <mickamusset@gmail.com>)
Responses Re: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc

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

pgsql-jdbc by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: XA Xid to PostgreSQL transaction ID
Next
From: Michael musset
Date:
Subject: Fwd: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar