From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Exception storing ipaddress with JBoss after upgrade to 8.0-312.jdbc3 |
Date: | 2005-09-27 13:48:49 |
Message-ID: | 9A7B5B70-61C1-4573-B3BC-31D991C7B02F@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Joost,
The new driver uses server side prepared statements and is much more
particular about the types being sent.
You can force v2 protocol, or create a PGInet type extending PGObject
Regards,
Dave
On 27-Sep-05, at 3:06 AM, Joost Kraaijeveld wrote:
> Hi,
>
> I am trying to store an ipaddress in a PostgreSQL column of a INET
> type.
> This used to work with pg74.216.jdbc3 but after an upgrade to
> postgresql-8.0-312.jdbc3 I get an exception:
>
> ERROR: column "ipaddress" is of type inet but expression is of type
> character varying.
>
> The PostgreSQL log shows:
>
> LOG: statement: INSERT INTO accesspoint (objectId, ipAddress,
> locationName, macAddress, manufacturer, serialNumber, supplier,
> typeName, address) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
> 2005-09-27 08:57:48 [12459] ERROR: column "ipaddress" is of type inet
> but expression is of type character varying
> HINT: You will need to rewrite or cast the expression.
>
> De CMP field is defined as @jboss.jdbc-type VARCHAR and @jboss.sql-
> type
> INET
>
> Is this a known problem? If so, is there a known sollution (and are
> you
> willing to share that sollution ;-))?
>
> The suggestion about the rewrite/cast hint is not possible because
> this
> is a CMP bean and JBoss takes care of writing that .
>
>
> --
> Groeten,
>
> Joost Kraaijeveld
> Askesis B.V.
> Molukkenstraat 14
> 6524NB Nijmegen
> tel: 024-3888063 / 06-51855277
> fax: 024-3608416
> e-mail: J(dot)Kraaijeveld(at)Askesis(dot)nl
> web: www.askesis.nl
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Alfredo Rico | 2005-09-27 15:17:36 | Trouble with PreparedStatement.setBinaryData or setBytes() |
Previous Message | GyLes | 2005-09-27 08:19:47 | JDBC 3 version 8.0 Error from cast conversion |