Re: Help With the JDBC driver

From: Barry Lind <blind(at)xythos(dot)com>
To: "Marsh, Dan" <dmarsh(at)spiritcruises(dot)com>
Cc: "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Help With the JDBC driver
Date: 2003-09-11 16:04:22
Message-ID: 3F609D06.4040402@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dan,

Are you running with the latest version of the drivers from the
jdbc.postgresql.org site?

On the surface this looks like a character encoding issue. What
charcter encoding is the database you are connecting to using? (use the
\l command in psql to see). Are you storing/trying to store data that
is incompatible with that character encoding? (for example is your
database SQL_ASCII, but you are trying to store LATIN1 characters?).

thanks,
--Barry

Marsh, Dan wrote:
> Hello I am on a SCO UNIXWARE 7.1.1 box using java version 1.1.7b with the
> jdk being 1.2. I am trying to connect to an Postgres database which is in
> my network. I am using the pg73jdbc1.jar and have also tried to use the
> pg73jdbc2.jar to connect. The following line of code works.
> <<...OLE_Obj...>> Then I try to run the next line and I get an error.
> <<...OLE_Obj...>>
> The error is as follows
> Something unusual has occured to cause the driver to fail. Please report
> this exception: Exception: java.lang.IllegalArgumentException:
> sun.io.CharToByteUTF-8
> Stack Trace:
>
> java.lang.IllegalArgumentException: sun.io.CharToByteUTF-8
> at sun.io.CharToByteConverter.getConverterClass(Compiled Code)
> at sun.io.CharToByteConverter.getConverter(Compiled Code)
> at java.lang.String.getBytes(Compiled Code)
> at org.postgresql.core.Encoding.isAvailable(Compiled Code)
> at org.postgresql.core.Encoding.encodingForDatabaseEncoding(Compiled
> Code)
> at org.postgresql.core.Encoding.getEncoding(Compiled Code)
> at
> org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(Compiled Code)
> at org.postgresql.Driver.connect(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at CfsOppFill.main(Compiled Code)
> End of Stack Trace
>
> at java.lang.Throwable.<init>(Compiled Code)
> at java.lang.Exception.<init>(Compiled Code)
> at java.sql.SQLException.<init>(Compiled Code)
> at org.postgresql.util.PSQLException.<init>(Compiled Code)
> at org.postgresql.Driver.connect(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at CfsOppFill.main(Compiled Code)
> Please help!
>
> Thank You,
> Dan P. Marsh
> Database Administrator OCIAP, OCDBA
> dmarsh(at)spiritcruises(dot)com
>
> If at first you don't succeed blame it on the computer!
>
>
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2003-09-11 16:06:38 Re: German Umlauts and JDBC
Previous Message James Robinson 2003-09-11 13:28:50 Re: JBoss w/int8 primary keys in postgres ...