• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Datasource could not be found when it definitely should be

New Here ,
Feb 12, 2012 Feb 12, 2012

Copy link to clipboard

Copied

Hi

We are getting the error "Datasource [NameOfDatasource] could not be found" for a particular CF datasource and can't work out why.  A restart of CF resolves the error as does deleting the datasource and recreating it with the exact same properties.  This started happening a couple of months after installing CF. 

The server is CF 9.0.1 running on Win 2008 R2 (SP1) 64-bit.

The database and port the datasource connects to is definitely correct, so this is not the issue.  We thought it may be an issue with the "Maintain connections across client requests" setting not maintaining a connection, but the issue still occurs even with this option turned off.

We create the datasource via code by making a copy of an existing 'template' datasource (using duplicate) and then setting properties of the copy.  We use coldfusion.server.ServiceFactory.DataSourceService.DataSources to get the template datasource and to add the new datasource.  We are investigating how to create the datasource from scratch using the Admin API (cfide.adminapi.administrator) rather than using the template to see if this resolves the issue, but in the meantime thought we would post to the forums to see if anyone can work out why its failing.

I created another post here that may be related whereby scheduled tasks are running several times daily when they shouldn't be.  I don't know if these are related but they seemed to have started happening around the same time.

I didn't know whether this should be classed as a 'Question' or not, so ticked it just in case.

Thanks

Nathan

Views

7.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2012 Feb 13, 2012

Copy link to clipboard

Copied

Two vital questions remain unanswered:

1) Did you initially create the datasource in the ColdFusion Administrator?

2) What is the type and version of the database engine?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 13, 2012 Feb 13, 2012

Copy link to clipboard

Copied

Hi BKBK

The 'template' datasource we duplicate to create the datasource was created using the CF Administrator.  Interestingly, there are many other datasources that follow the same creation process (i.e. use the template) but which are not having a problem.

We modified the code last night to use cfide.adminapi.datasource to create the datasource rather than the template and the issue happened again last night.

The DB is SQL Server 2008 R2.

Thanks

Nathan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2012 Feb 14, 2012

Copy link to clipboard

Copied

It still sounds much too complex to me. My point is, do nothing with (that is, comment out) the cfide.adminapi.datasource code. Just follow the steps to create an SQL Server datasource in the ColdFusion Administrator. What happens then?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 14, 2012 Feb 14, 2012

Copy link to clipboard

Copied

We use the adminapi so that the datasources can be created by the application automatically if they don't exist.  It's not viable to have to create it via the Administrator from a production perspective.

I should point out that this application is running without this issue on other servers at different sites. Any suggestions on why it works on all but this one server?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2012 Feb 14, 2012

Copy link to clipboard

Copied

We use the adminapi so that the datasources can be created by the application automatically if they don't exist.  It's not viable to have to create it via the Administrator from a production perspective.

No, but it's useful for testing things, like whether there's a problem in the API code that doesn't exist within the CF Administrator.

Dave Watts, CTO, Fig Leaf Software

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 04, 2013 Jan 04, 2013

Copy link to clipboard

Copied

Was there any resolution to this problem? We are now having the same type of issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 04, 2013 Jan 04, 2013

Copy link to clipboard

Copied

We've had no response at all. We're very disappointed with Adobe.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 04, 2013 Jan 04, 2013

Copy link to clipboard

Copied

"you're very disappointed with Adobe"

Did you actually raise a support ticket with them? ABs they weren't able to resolve it?

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 05, 2013 Jan 05, 2013

Copy link to clipboard

Copied

Sorry "and" not "ABs". Phone auto-"correct".

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 05, 2013 Jan 05, 2013

Copy link to clipboard

Copied

Yes we lodged it as a bug. I'm not at work for the next week and can't

remember the number. Will try to update this post with the number next week.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 07, 2013 Jan 07, 2013

Copy link to clipboard

Copied

Yes we lodged it as a bug. I'm not at work for the next week and can't

remember the number. Will try to update this post with the number next week.

Well that's good, but this doesn't mean Adobe are going to leap up and fix it for you: it just means it'll go into the pot for triage & possible action the next time there's a CF release. I meant here's no solid proof it's not just a vagary of something you've done yet, rather than a problem with CF itself.

If you want Adobe to jump when you have an issue, you need to raise a support ticket with them.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 07, 2013 Jan 07, 2013

Copy link to clipboard

Copied

LATEST

Out of curiosity, what did you name the datasource?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation