Christopher Cheng wrote:
I found the following exception after running the web application for days.
<snip/>
Caused by: java.lang.NullPointerException
at com.jnetdirect.jsql.am.clearParameters(Unknown Source)
This is a JDBC-driver exception and is probably caused by a server-side dropped
Connection object getting reused from pool due to a missing validation query.
You need a validation query for your connection pool to avoid this.
Since you are using a DataSource, you cannot directly specify the validation
query in OJB - instead you will have to configure you DataSource to use it.
However, since the concept of a validation query also applies when using
OJB connection pooling you can google for [ojb "validation query"] to get
some recent user-list discussions regarding this.
A direct link to a recent thread:
http://www.mail-archive.com/[email protected]/msg13521.html
You can use the same validation query (ie "SELECT 1") for MS SQL Server
as the specified MySQL example.
Since your stacktrace shows "com.caucho.sql" I take it that you use
Resin for your DataSource definition and connection pooling?
If so, check Resin docs for how to configure the validation query:
http://www.caucho.com/resin-3.0/db/config.xtp#Core-Configuration
http://www.caucho.com/resin-3.0/db/config.xtp#reliability
(The concept of performing 'validation queries' seems to be called
"pinging" in Caucho terminology. It also seems that ping="true" equals
Apache Commons Pool setting of testOnBorrow="true".)
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]