Thread: Problem with postgres and Suse

Problem with postgres and Suse

From
Albert Vilà
Date:
I have an application with postgresql, I have tried with a Debian and
postgresql (7.4.5) with jdbc (pg74jdbc3) and all it's ok
The problem is with a Suse 9.1 and postgres 7.4.2, that sometimes
appears a java.lan.exception in some query, I have tried with the same
jdbc and another version (pg74.215.jdbc3,pgdev.305.jdbc3)

What is the problem?

Re: Problem with postgres and Suse

From
Kris Jurka
Date:

On Tue, 14 Sep 2004, [ISO-8859-1] Albert Vil� wrote:

> I have an application with postgresql, I have tried with a Debian and
> postgresql (7.4.5) with jdbc (pg74jdbc3) and all it's ok
> The problem is with a Suse 9.1 and postgres 7.4.2, that sometimes
> appears a java.lan.exception in some query, I have tried with the same
> jdbc and another version (pg74.215.jdbc3,pgdev.305.jdbc3)
>

You haven't provided any information with which we could diagnose this
problem.  What's the stacktrace?  What's the query?

Kris Jurka


Re: Problem with postgres and Suse

From
Kris Jurka
Date:

On Tue, 14 Sep 2004, [ISO-8859-1] Albert Vil� wrote:
>
> java.lang.NullPointerException
>     at org.postgresql.util.PSQLException.getSQLState(PSQLException.java:227)

This has been fixed in recent drivers.  You need a build number of at
least 213.  Your original email claimed to have tried build 215 which
should have worked, so you should try to verify that you are using the
driver you expect.

Kris Jurka

Re: Problem with postgres and Suse

From
Kris Jurka
Date:

On Tue, 14 Sep 2004, [ISO-8859-1] Albert Vilà wrote:

> With build 215 and Debian all it's ok
>
> Now with suse and 215 the problem is :
>
> java.lang.Exception: 0 -  - 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.

Yes, but this is different stacktrace than you initially showed.  The
error message seems clear.  What is the encoding of your database?  It
appears not to be set correctly for your data.  The JDBC driver (unlike
most other client interfaces) requires your data to be encoded correctly.
Unfortunately the only way to fix it is a dump and reload.

Kris Jurka