After some more trials I have found out that the problem is with the
encoding. The problematic table has a £ (pound) entry, which pg73jdbc3 is
having difficulties retrieving. I did tests with pg73jdbc3 using different
encoding and found the attached results:
<<LATIN1-errors.txt>> <<SQL_ASCII-errors.txt>>
<<UNICODE-errors.txt>>
Tests with pgjdbc2 gave the attached results:
<<pgjdbc2-LATIN1.txt>>
<<pgjdbc2-UNICODE-errors.txt>>
It appears that UNICODE has a problem even with pgjdbc2.
Attached is the Java file
<<TestJDBC.java>>
Please help.
> -----Original Message-----
> From: J M Okomba [SMTP:Okomba@kabage.co.ke]
> Sent: 11 March 2003 15:48
> To: 'pgsql-jdbc'
> Subject: Re: [JDBC] Problem with driver
>
>
> After doing some more tests I have discovered that the problem is most
> likely being caused by the context (environment) of the application I am
> calling. I have managed to access the problematic table from a bare Java
> application. I will try to find out why I can't access it from a
> JSP/servlet.
>
> Thanks.
>
> > -----Original Message-----
> > From: Dave Cramer [SMTP:Dave@micro-automation.net]
> > Sent: 11 March 2003 12:14
> > To: J M Okomba
> > Cc: 'pgsql-jdbc'
> > Subject: Re: [JDBC] Problem with driver
> >
> > Can you send us a test case so we can replicate the problem here
> >
> > Dave
> > On Tue, 2003-03-11 at 01:40, J M Okomba wrote:
> > > I keep getting this error:
> > >
> > > Database error in EmbeddedData.fetchData Invalid character data was
> > found.
> > > This is most likely caused by stored data containing characters that
> are
> > > invalid for the character set the database was created in. The most
> > common
> > > example of this is storing 8bit data in a SQL_ASCII database
> > >
> > > with current postgres drivers downloaded from
> > > http://jdbc.postgresql.org/download/ (like pg73jdbc3.jar and others).
> > The
> > > error is only thrown when I try to access one table (other tables in
> the
> > > database work fine).
> > >
> > > However I don't get this error with pgjdbc2.jar, which I downloaded
> > about 8
> > > months ago.
> > >
> > > I will appreciate any help to resolve the problem. I really need to
> use
> > new
> > > features in the updated drivers.
> > >
> > >
> > > ---------------------------(end of
> broadcast)---------------------------
> > > TIP 3: if posting/reading through Usenet, please send an appropriate
> > > subscribe-nomail command to majordomo@postgresql.org so that your
> > > message can get through to the mailing list cleanly
> > --
> > Dave Cramer <Dave@micro-automation.net>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster