Title:
Concurrency issue accessing / verifying a datasource - "could not locate" datasource
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/CannotReproduce
Reporter/Name(from Bugbase): paul karlin / paul karlin (Paul Karlin APT)
Created: 10/17/2012
Components: Administrator, Administrator Console
Versions: 10.0
Failure Type: Crash
Found In Build/Fixed In Build: Final /
Priority/Frequency: Critical / Most users will encounter
Locale/System: English / Windows 7 SP1 64-bit
Vote Count: 1
Problem Description:
We periodically see an error of the following form:
"Could not locate [DATASOURCENAME_REDACTED]. This usually means that the jrun-resources file does not contain configuration data for this database or pool."
(Presumably this is an old message that just wasn't updated, because I know CF10 doesn't use jrun any more, but the wording of the error is NOT the primary issue.)
We also saw this error a long time ago in ColdFusion 8 Standard Edition, and it's one of the reasons we upgraded to Enterprise. But it appears that whatever internal mechanism maintains datasources is no longer thread-safe. From the raw stack trace below, the problem could potentially be in PoolManager, JDBCManager, JRunDataSource, CFDataSource, or DataSrcImpl.
This issue will prevent us from upgrading from CF8 to CF10.
Steps to Reproduce:
Start several client/browser threads running unit tests or just hitting multiple CFMs/CFCs at once. At the beginning of each thread, use the CF Admin API to verify the existence of a datasource and add it if necessary.
Actual Result:
Some of the threads will fail with the error mentioned above. Usually, our testing environment appears to hit the error in groups of 2-5 times within seconds of each other, and it happens nearly every time we run our unit tests. We believe our datasource verification code is failing to find a datasource that exists and therefore trying to re-add it. (In CF8 Enterprise, even forcing the same code to re-add a datasource works fine and works consistently with no concurrency issues.)
Raw stack trace:
java.sql.SQLException: ERROR: Could not locate [DATASOURCENAME_REDACTED]. This usually means that the jrun-resources file does not contain configuration data for this database or pool.
at coldfusion.server.j2ee.pool.PoolManager.getPool(PoolManager.java:45)
at coldfusion.server.j2ee.sql.pool.JDBCManager.requestConnection(JDBCManager.java:115)
at coldfusion.server.j2ee.sql.JRunDataSource.getConnection(JRunDataSource.java:135)
at coldfusion.sql.CFDataSource.getConnection(CFDataSource.java:42)
at coldfusion.sql.DataSrcImpl.getCachedConnection(DataSrcImpl.java:156)
at coldfusion.sql.DataSrcImpl.getConnection(DataSrcImpl.java:110)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:363)
at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:1056)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:685)
Expected Result:
All threads should run successfully.
Any Workarounds:
None.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3348475
External Customer Info:
External Company:
External Customer Name: Paul Karlin APT
External Customer Email:
External Test Config: My Hardware and Environment details:
Windows Server 2008 x64 running multiple instances of 64-bit ColdFusion 10.0.3 Enterprise Edition (same issue in CF10 prior to 10.0.3)
Attachments:
Comments: