darkwisperer
darkwisperer

Reputation: 73

Coldfusion 9 Datasource could not be found

I have set up a Data Source in the ColdFusion Admin panel. When I try and use this in the application, I get the error: Datasource [name] could not be found. I have verified that the Data Source Name I am using in the application is identical to that which was set up in the admin panel (multiple tries both manual typing and ctr+a + ctr+c) with no luck.

What I have tried:

Any guidance?

EDIT

There are 3 running instances. None of which have an admin panel that loads(ERR_CONNECTION_RESET). Verbatim error message:

The web site you are accessing has experienced an unexpected error. Please contact the website administrator.

The following information is meant for the website developer for debugging purposes. Error Occurred While Processing Request Datasource test could not be found."

Related code that is throwing the error:

<cfset Application.datasource = "test">
<cfinclude template="templates/header.cfm">
<cfinclude template="templates/horizontal_navigation.cfm">
<cfquery name="getUsers" datasource="#application.datasource#">
    select *
    from role_lookup rl

Upvotes: 0

Views: 2121

Answers (2)

richard
richard

Reputation: 1

attributes.datasource can work to when passing variables

Upvotes: -1

darkwisperer
darkwisperer

Reputation: 73

I was under the impression that ColdFusion instances were isolated. Which seems true between apps, however the parent that spawned the instances "seems" to be allowing data source inheritance.

The issue was caused by having an identically named data source in the parent instance. The parent instance will override data sources of the same name, so when the parent data source of the same name was not pointed at a valid database it threw those errors.

I have not been able to find anything about this through research, so it might have been a coincidence and something else I changed around the same time could have been the actual issue.

Upvotes: 2

Related Questions