cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Baldwin <jfbald...@earthlink.net>
Subject Cayenne Supported DBCP Properties
Date Thu, 27 May 2010 08:15:32 GMT
I asked this question previously but got no response.  The problem appears to be with Cayenne
supported DBCP properties.

My webapp is getting the following exception (Cayenne 3.0, with dbcpdatasourcefactory):

	java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject
failed
	org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1191)

When the following two parameters are added to the dbcp.properties file

	cayenne.dbcp.validationQuery="select 1"
	cayenne.dbcp.testOnBorrow=true

(Note: This does not occur if the two parameters are left out.)

My understanding from the Apache DBCP docs is that the "testOnBorrow" will not be run if the
"validationQuery" parameter is not set, and therefore they must both be set for this "testOnBorrow"
validation to occur.

Furthermore, the cayenne docs

	http://cayenne.apache.org/doc30/dbcpdatasourcefactory.html

list these two parameters as supported by Cayenne dbcpDataSourceFactory.

Questions:
1. Are these parameters actually supported as I understand them, and if so, then has anyone
seen this exception?
2. What is the default connection-validation behavior when these parameters are absent from
the configuration?
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message