No class found for inet

Lists: pgsql-jdbc
From: "Antony Paul" <antonypaul24(at)hotmail(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: No class found for inet
Date: 2004-07-11 13:28:32
Message-ID: BAY15-DAV12K7aI4z93000b3af8@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hi all,
I am using Apache Commons BeanUtils RowSetDynaClass for disconnected
resul tsets. But it gives error when I pass a ResultSet which contains an
inet column type what to do with it. Why postgres is not providing classes
for postgres specific data types ?.
Using Postgres 7.3

rgds
Antony Paul.


From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Antony Paul <antonypaul24(at)hotmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: No class found for inet
Date: 2004-07-11 14:54:34
Message-ID: 40F154AA.8040800@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Antony Paul wrote:
> Hi all,
> I am using Apache Commons BeanUtils RowSetDynaClass for disconnected
> resul tsets. But it gives error when I pass a ResultSet which contains an
> inet column type what to do with it.

What is the error?

> Why postgres is not providing classes
> for postgres specific data types ?.

Because noone has written support for them yet. java.net.InetAddress is
not a good data container for the inet type as it does not store netmask
information, so we'd need a postgresql-specific type.

It's pretty easy to write code to support new types -- take a look at
how the geometric types (org.postgresql.geometric.*) are supported. Once
written you can either register the class with the driver at runtime
(PGConnection.addDataType) or patch the driver to know about the new
class automatically.

> Using Postgres 7.3

What JDBC driver version?

-O