tracker issue : CF-3348475

select a category, or use search below
(searches all categories and all time range)

Concurrency issue accessing / verifying a datasource - "could not locate" datasource

| View in Tracker

Status/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( 
  at coldfusion.server.j2ee.sql.pool.JDBCManager.requestConnection( 
  at coldfusion.server.j2ee.sql.JRunDataSource.getConnection( 
  at coldfusion.sql.CFDataSource.getConnection( 
  at coldfusion.sql.DataSrcImpl.getCachedConnection( 
  at coldfusion.sql.DataSrcImpl.getConnection( 
  at coldfusion.sql.SqlImpl.execute( 
  at coldfusion.tagext.sql.QueryTag.executeQuery( 
  at coldfusion.tagext.sql.QueryTag.doEndTag( 

Expected Result:
All threads should run successfully.

Any Workarounds:

----------------------------- 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)



Hi Paul, I am not able to reproduce it. I am running 1000 threads that are invoking admin api to verify the data source but it is not showing error. Please provide additional information so that i can reproduce it.
Comment by Suchika S.
17485 | October 01, 2013 04:33:02 AM GMT
As there is no response from the user, Closing the bug as Cannot Reproduce. If you are still facing the issue, please provide the repro case, will re-open the bug.
Comment by Suchika S.
17486 | December 03, 2014 03:02:22 AM GMT
Just seen this message today on a production server and found this tracker item among the first google hits. It's an CF 11 or even 2016 server; so no jrun. No idea how to produce this error willingly.
Vote by Bernhard D.
29303 | July 13, 2018 01:54:36 PM GMT
I will note that I filed this issue in October 2012, and due to lack of response from Adobe at the time, we abandoned our efforts to update from ColdFusion 8 to 10. I don't think I ever saw the comments from October 2013 or December 2014 posted to this issue, but I did receive a notification today about the vote. For what it's worth, we are now running ColdFusion 11 and have not seen this issue recently.
Comment by Paul K.
29302 | July 13, 2018 02:40:05 PM GMT