Received: from maia.hub.org (unknown [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 06DE21337B43 for ; Sat, 23 Oct 2010 03:25:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 06823-01 for ; Sat, 23 Oct 2010 06:25:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 050801337999 for ; Sat, 23 Oct 2010 03:25:49 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id 987EA28454; Sat, 23 Oct 2010 02:25:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=C0yUh1pJUUeIoBa8ibs649iJR6A=; b=kqcyrc +vNvtQYrBahoLJ6wF66Y49rilsK3my1+7hgj+30cgl6eXMxjPyfv1zuKhnJe+lhy y6xeyh64hV1lClvVm9AFyy3ZZk7kzybcgpxYdBbj2SDKQAQ4xJf6HvuHPKFHKc/k VmwQMUONNWbA5oS1PidRPYwZqF7U1R42aF3Gw= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 7426A28441; Sat, 23 Oct 2010 02:25:49 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 65DB6A860; Sat, 23 Oct 2010 02:25:49 -0400 (EDT) Date: Sat, 23 Oct 2010 02:25:49 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Michael musset cc: pgsql-jdbc@postgresql.org Subject: Re: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/143 X-Sequence-Number: 21111 On Thu, 21 Oct 2010, Kris Jurka 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. > I've put a fix for this into CVS. I've uploaded a new jar file here: http://ejurka.com/pgsql/jars/xml/ Kris Jurka