You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Mehrle <mi...@datasaur.com> on 2002/06/17 03:29:00 UTC

Poolman generates random NullPointerExceptions

My Action's database access method makes three separate queries to my DB sequentially. After each query I close my connection, my statement and my resultSet (if applicable). My code works fine, unless there is no DB access for one hour or so (we are still testing the system). After one hour or so, if I submit my form again I get the following error:

java.lang.NullPointerException
        at org.postgresql.core.QueryExecutor(QueryExecutor.java:61)
        at org.postgresql.Connection.ExecSQL(Connection.java:398)
        at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
        at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73)
        at org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:113)
        at com.codestudio.sql.PoolmanPreparedStatement.executeUpdate(Unknown Source)
        ......

Anyone ever seen this one before? I was digging around and found a posting indicating that the connection should NOT be closed before returning it to the pool. However, that was not related to Poolman, so I think it does not apply. Anyway, any good ideas would be appreciated - I'm going live on Tuesday and this crept up on me.....

Cheers,

Michael

Re: Poolman generates random NullPointerExceptions

Posted by Jin Bal <ji...@hotmail.com>.
We've also experienced some strange behaviour *possibly* to with poolman.
The key here is to work out whether it is actually poolman or not.

We had problems with "end of file on communication channel" after about 30
minutes idle, which didn't happen with bog standard JDBC connections.  Which
led us to believe that it was PM.  The problem is is that there isn't much
discussion or docs about it (not that i could find anyway).

Try playing with the settings in the poolman.xml (like setting timeouts to 0
which I think turns them off)

check out:
http://www.codestudio.com/PoolMan/PoolManXML.html

This might help - however this sort of problem is difficult to test
particularly with the timescales involved.  The best test would be to test
replacing poolman completely and see what happens....

HTH
Jin
----- Original Message -----
From: "Michael Mehrle" <mi...@datasaur.com>
To: <st...@jakarta.apache.org>
Sent: Monday, June 17, 2002 2:29 AM
Subject: Poolman generates random NullPointerExceptions


> My Action's database access method makes three separate queries to my DB
sequentially. After each query I close my connection, my statement and my
resultSet (if applicable). My code works fine, unless there is no DB access
for one hour or so (we are still testing the system). After one hour or so,
if I submit my form again I get the following error:
>
> java.lang.NullPointerException
>         at org.postgresql.core.QueryExecutor(QueryExecutor.java:61)
>         at org.postgresql.Connection.ExecSQL(Connection.java:398)
>         at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
>         at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73)
>         at
org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:
113)
>         at
com.codestudio.sql.PoolmanPreparedStatement.executeUpdate(Unknown Source)
>         ......
>
> Anyone ever seen this one before? I was digging around and found a posting
indicating that the connection should NOT be closed before returning it to
the pool. However, that was not related to Poolman, so I think it does not
apply. Anyway, any good ideas would be appreciated - I'm going live on
Tuesday and this crept up on me.....
>
> Cheers,
>
> Michael
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>