JavalangNullPointerException apparently for no reason

The process receives an XML document with 7000 Records or child elemts in it. It iterates through this document using
nodeIterator

  1. Grabs one record at a time and formats the record into a SQL string.
  2. Opens a connection to Database (Microsft SQL Server).
  3. Start Transaction.
  4. ExecSQL
  5. Commit/Roll Back
  6. Close Connection

Repeat till there no more records in the file. I had used Microsoft JDBC Driver as well as the Data Direct JDBC Driver
The connection paramerters for database
are
Minimum Connections — 1
Maximum Connections — 20
Expiration Time (ms) — 120000

The Flow throws a NullPointerException the very first time after 26 min and then on every 20 min. I had switched on ‘watt.server.jdbcLogFile=jdbc.log’ to see jdbc logs and the Error occurs at execSQL, The SQL itself is valid, It mentions about database cursors being maxed out that in turn gets transalted as NullPointerException.

The way the process handles this situation is when ever there is a NullPointerException it backs off and retries the same record and that fixes the problem.

Is this a known problem ? I don’t see any traffic on this or
I am doing something fundamentally wrong or is there a back ground process that garbase collects a database object even though it is in use.

any thoughts/ resolutions ?

Thanks much

This is a webMethods problem of some kind. Certain drivers throw exceptions that webMethods doesn’t recognize - so it isn’t re-establishing a connection properly. I believe this was fixed in 4.6 SP2.

We were getting a null pointer exception on the execSQL call at random points when we used the scheduler to start off the process. If we ran it under a normal user session it worked fine.

If you are getting maximum cursors exceeded than you should look into using connection pooling to limit the number of connections webMethods uses to access the database.

Will