QueryExecutor NullPointerException invalid Connection? - Mailing list pgsql-jdbc

From Daniel Germain
Subject QueryExecutor NullPointerException invalid Connection?
Date
Msg-id CBEDKGKJPKEBDJECDAGLMEGGCEAA.daniel.germain@gipsynet.com
Whole thread Raw
In response to Re: ResultSet.getDate failure with timestamp column  (Barry Lind <barry@xythos.com>)
Responses Re: QueryExecutor NullPointerException invalid Connection?
List pgsql-jdbc
Hi,

We keeps having these kind of random errors.

*** Caused by:
java.lang.NullPointerException
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:61)
    at org.postgresql.Connection.ExecSQL(Connection.java:376)
    at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
    at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
    at
org.postgresql.jdbc2.PreparedStatement.executeQuery(PreparedStatement.java:9
9)
    at
com.lutris.dods.builder.generator.query.QueryBuilder.executeQuery(QueryBuild
er.java:1541)

*** Caused by:
java.lang.NullPointerException
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:61)
    at org.postgresql.Connection.ExecSQL(Connection.java:398)
    at org.postgresql.Connection.ExecSQL(Connection.java:381)
    at org.postgresql.Connection.setAutoCommit(Connection.java:834)
    at
com.lutris.appserver.server.sql.standard.StandardDBConnection.reset(Standard
DBConnection.java:285)

QueryExecutor:
    public java.sql.ResultSet execute() throws SQLException
    {

        int fqp = 0;
        boolean hfr = false;

line 61->        synchronized (pg_stream)


From my investigation pg_stream is set to null when ever a connection is
closed.

We are using the lastest "Developement driver" from CVS 2001/12/20.
We are not using the lastest stable PostgreSQL 7.1.x Java 2 drivers
since we need some patches that were applied only on the developement
version.
We are using Enhydra3.1 from Lutris as the database layer and everything
is working fine with the same code but with Microsoft SQLServer, so my guess
is that this problem is more Postgres related than Enhydra. I was not able
to find any reference to this problem elsewhere.

Enhydra manages its own connection pool, and check if the database
connection
is valid and remove it when appropriate but for some reason it seem to get
and
invalid one with this null pointer.

TIA

Daniel





pgsql-jdbc by date:

Previous
From: "Dave Cramer"
Date:
Subject: Re: JDBC Driver Munging My Text?
Next
From: Jens Kießling
Date:
Subject: