QueryExecutor NullPointerException invalid Connection?

Поиск
Список
Период
Сортировка
От Daniel Germain
Тема QueryExecutor NullPointerException invalid Connection?
Дата
Msg-id CBEDKGKJPKEBDJECDAGLMEGGCEAA.daniel.germain@gipsynet.com
обсуждение исходный текст
Ответ на Re: ResultSet.getDate failure with timestamp column  (Barry Lind <barry@xythos.com>)
Ответы Re: QueryExecutor NullPointerException invalid Connection?  ("Dave Cramer" <Dave@micro-automation.net>)
Список 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 по дате отправления:

Предыдущее
От: "Dave Cramer"
Дата:
Сообщение: Re: JDBC Driver Munging My Text?
Следующее
От: Jens Kießling
Дата:
Сообщение: