On 7/8/07, Vernon <[EMAIL PROTECTED]> wrote:
Could some one help us figure this issue out?I am getting a NoSuchElementException with dbcp 1.2.2 as follows: 2007-07-08 01:58:14,063 CONFIG: org.jamwiki.Environment - Loading properties from /home/vds/downloads/apache-tomcat-6.0.13/webapps/jamwiki-0.6.0/WEB-INF/classes/sql.ansi.properties 2007-07-08 01:58:18,318 SEVERE: org.jamwiki.utils.Utilities - Invalid database settings org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error: Could not create a validated object, cause: ValidateObject failed at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:184) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:193) at org.jamwiki.db.DatabaseConnection.setUpConnectionPool(DatabaseConnection.java:315) at org.jamwiki.db.DatabaseConnection.testDatabase(DatabaseConnection.java:334) at org.jamwiki.utils.Utilities.validateSystemSettings(Utilities.java:1236) at org.jamwiki.servlets.SetupServlet.validate(SetupServlet.java:199) at org.jamwiki.servlets.SetupServlet.initialize(SetupServlet.java:120) Farther down in the trace is this: Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:871) at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:176) ... 54 more We are using the commons-dbcp API for a web application running in systems as follows: * Fedora Core release 6 (Zod) * apache-tomcat-6.0.13 * Java 1.5.0_06-b05 * embedded version of the HSQL database More details about this issue on our wiki here: http://jamwiki.org/wiki/en/Feedback#MORE_INSTALL_PROBLEMS If anyone can help me understand what I've done wrong, I would greatly appreciate it. - Vernon
Looks like you have the pool configured to validate objects when they are borrowed (testOnBorrow = true) and the validation is failing. This appears to be configured in the setupConnectionPool method here: http://jamwiki.svn.sourceforge.net/viewvc/jamwiki/wiki/trunk/src/java/org/jamwiki/db/DatabaseConnection.java?revision=1489&view=markup Most likely the validation query is incorrect or failing to return at least one row. hth, Phil --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
