Thread: No class found for inet

No class found for inet

From
"Antony Paul"
Date:
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.

Re: No class found for inet

From
Oliver Jowett
Date:
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