QueryExecutor NullPointerException invalid Connection?

From: "Daniel Germain" <daniel(dot)germain(at)gipsynet(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: QueryExecutor NullPointerException invalid Connection?
Date: 2001-12-21 18:59:10
Message-ID: CBEDKGKJPKEBDJECDAGLMEGGCEAA.daniel.germain@gipsynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nick Fankhauser 2001-12-21 20:49:29 resultset contains too many rows!
Previous Message Hunter Hillegas 2001-12-21 17:04:12 Re: JDBC Driver Munging My Text?