Re: setBlob(InputStream) not supported?

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Benson Margulies <bimargulies(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: setBlob(InputStream) not supported?
Date: 2011-09-30 12:08:32
Message-ID: CADK3HHLLfnPO23iKFmbA7_b3UwtALieCW=nd7JrTbivxD02FYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

So looking at the jdbc4 code for this it would make sense to refactor
the jdbc2 code to allow passing in an input stream.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On Wed, Sep 28, 2011 at 7:34 AM, Benson Margulies <bimargulies(at)gmail(dot)com> wrote:
> I've got a web service that is coded to stream data into a database
> blob via jdbc, and which uses, therefore, the setBlob(InputStream) API
> on the prepared statement.
>
> I was rewarded in the very latest driver with a 'not yet implemented'.
> Is there a recommended workaround for this?
>
>
> org.springframework.dao.InvalidDataAccessApiUsageException:
> PreparedStatementCallback; SQL [insert into document (id, contents,
> created, metadata) values (?, ?, ?, ?)]; Method
> org.postgresql.jdbc4.Jdbc4PreparedStatement.setBlob(int, InputStream)
> is not yet implemented.; nested exception is
> java.sql.SQLFeatureNotSupportedException: Method
> org.postgresql.jdbc4.Jdbc4PreparedStatement.setBlob(int, InputStream)
> is not yet implemented.
>        ...
> Caused by: java.sql.SQLFeatureNotSupportedException: Method
> org.postgresql.jdbc4.Jdbc4PreparedStatement.setBlob(int, InputStream)
> is not yet implemented.
>        at org.postgresql.Driver.notImplemented(Driver.java:753)
>        at org.postgresql.jdbc4.AbstractJdbc4Statement.setBlob(AbstractJdbc4Statement.java:164)
>        at com.basistech.jdd.sql.JDDDao$1.doInPreparedStatement(JDDDao.java:198)
>        at com.basistech.jdd.sql.JDDDao$1.doInPreparedStatement(JDDDao.java:1)
>        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:586)
>        ... 28 more
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message dmp 2011-09-30 15:07:18 Re: metadata.getColumns() using Apache Tomcat / jndi
Previous Message Dave Cramer 2011-09-30 10:07:00 Re: metadata.getColumns() using Apache Tomcat / jndi