Re: problem with setting boolean value on AbstractJdbc1Statement

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Stuart M Easterling <stuarte(at)cmu(dot)edu>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: problem with setting boolean value on AbstractJdbc1Statement
Date: 2003-09-26 22:56:40
Message-ID: 20030926225638.GA19858@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, Sep 26, 2003 at 11:02:05AM -0400, Stuart M Easterling wrote:
>
> Hello,
>
> I get the following error when the JBoss EJB container attempts to set a
> BOOLEAN value on the AbstractJdbc1Statement:
>
> Unknown Types value.
> at org.postgresql.jdbc1.AbstractJdbc1Statement.setObject
> (AbstractJdbc1Statement.java:1423)
> at org.postgresql.jdbc1.AbstractJdbc1Statement.setObject
> (AbstractJdbc1Statement.java:1429)
> at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject
> (WrappedPreparedStatement.java:607)
> at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter
> (JDBCUtil.java:292)
> .
> .
> .
>
> I'm running Postgres 7.3.2 on Red Hat (and Windows) using the latest JDBC3
> driver.
>
> Any thoughts, ideas from anyone?

From the stack trace you're not running the most recent JDBC3 code. In CVS,
Types.BOOLEAN is translated to Types.BIT in AbstractJdbc3Statement and then
passed to the superclass. If you're running a JDBC1 or JDBC2 build, then
that translation will not happen, and AbstractJdbc1Statement does not
understand Types.BOOLEAN.

I'm not sure when this behaviour was introduced, though, perhaps it hasn't
made it into the current JDBC3 binaries. Try rebuilding the driver from CVS
and see if the problem goes away?

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jon Jensen 2003-09-26 23:37:10 Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)
Previous Message Bruce Momjian 2003-09-26 22:34:10 Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)