org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: ValidateObject failed

Sakai JIRA | Hardy Pottinger | 2 years ago
  1. 0

    After rebasing some recent work onto the DSpace:master branch (I was planning to deploy an upgrade using the master branch), I discovered that XMLUI could no longer connect to our Oracle back-end database. I found this via the dspace.log file, but I can reproduce it using just the ant test_database target. I have taken my own changes out of the picture and have just compiled the master branch with the same database configuration, and running ant test_database produces the same error (will paste the error below). However, checking out the dspace-4_x branch, compiling with the same database configuration, and running ant test_database works correctly. So... my assumption is, some recent change in master has broken Oracle compatibility. I will likely rebase my repository upgrade on the dspace-4_x maintenance branch, so I'm OK there... but, I did want to raise the red flag here. If I get a moment I will see if I can either skim through the recent commits, looking for anything that stands out as a likely culprit, or else I can just walk back through recent commits (I think there's a tool built for git to help you do this kind of hunting). It's probably about half a day's work. Could be less, could be more. Here's the error message: [java] Testing connection... [java] [java] Error: [java] - java.sql.SQLException: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: ValidateObject failed [java] [java] Please see the DSpace documentation for assistance. [java] [java] 2014-09-24 21:24:10,165 WARN org.dspace.storage.rdbms.DataSourceInit @ Exception initializing DB pool [java] org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: ValidateObject failed [java] at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114) [java] at org.dspace.storage.rdbms.DataSourceInit.getDatasource(DataSourceInit.java:138) [java] at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1476) [java] at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:575) [java] at org.dspace.storage.rdbms.DatabaseManager.main(DatabaseManager.java:1910) [java] Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed [java] at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1008) [java] at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) [java] ... 4 more BUILD FAILED ~/workspace/my_dspace_master/dspace/target/dspace-installer/build.xml:786: Java returned: 1

    Sakai JIRA | 2 years ago | Hardy Pottinger
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: ValidateObject failed
  2. 0

    After rebasing some recent work onto the DSpace:master branch (I was planning to deploy an upgrade using the master branch), I discovered that XMLUI could no longer connect to our Oracle back-end database. I found this via the dspace.log file, but I can reproduce it using just the ant test_database target. I have taken my own changes out of the picture and have just compiled the master branch with the same database configuration, and running ant test_database produces the same error (will paste the error below). However, checking out the dspace-4_x branch, compiling with the same database configuration, and running ant test_database works correctly. So... my assumption is, some recent change in master has broken Oracle compatibility. I will likely rebase my repository upgrade on the dspace-4_x maintenance branch, so I'm OK there... but, I did want to raise the red flag here. If I get a moment I will see if I can either skim through the recent commits, looking for anything that stands out as a likely culprit, or else I can just walk back through recent commits (I think there's a tool built for git to help you do this kind of hunting). It's probably about half a day's work. Could be less, could be more. Here's the error message: [java] Testing connection... [java] [java] Error: [java] - java.sql.SQLException: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: ValidateObject failed [java] [java] Please see the DSpace documentation for assistance. [java] [java] 2014-09-24 21:24:10,165 WARN org.dspace.storage.rdbms.DataSourceInit @ Exception initializing DB pool [java] org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: ValidateObject failed [java] at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114) [java] at org.dspace.storage.rdbms.DataSourceInit.getDatasource(DataSourceInit.java:138) [java] at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1476) [java] at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:575) [java] at org.dspace.storage.rdbms.DatabaseManager.main(DatabaseManager.java:1910) [java] Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed [java] at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1008) [java] at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) [java] ... 4 more BUILD FAILED ~/workspace/my_dspace_master/dspace/target/dspace-installer/build.xml:786: Java returned: 1

    Sakai JIRA | 2 years ago | Hardy Pottinger
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: ValidateObject failed
  3. 0

    Make validation query used in oxalis-jdbc-dbcp configurable

    GitHub | 3 years ago | glassius
    java.lang.IllegalStateException: Unable to retrieve connection org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: ValidateObject failed
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    hibernate.exception.GenericJDBCException: Cannot open connection

    Stack Overflow | 4 years ago | Abhineet Bhamra
    org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
  6. 0

    DSpace Tech Support - java.util.NoSuchElementException: Timeout waiting for idle object

    nabble.com | 8 months ago
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

  1. Yosef Moatti 1 times, last 10 months ago
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.NoSuchElementException

    Could not create a validated object, cause: ValidateObject failed

    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject()
  2. Commons Pool
    GenericObjectPool.borrowObject
    1. org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1008)
    1 frame
  3. Commons DBCP
    PoolingDataSource.getConnection
    1. org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
    1 frame
  4. DSpace Kernel :: API and Implementation
    DatabaseManager.main
    1. org.dspace.storage.rdbms.DataSourceInit.getDatasource(DataSourceInit.java:138)
    2. org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1476)
    3. org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:575)
    4. org.dspace.storage.rdbms.DatabaseManager.main(DatabaseManager.java:1910)
    4 frames