Coldfusion 9 Datasource could not be found - coldfusion

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:
Clearing the cache (component and template)
I have even tried different names in the DSN (admin panel) and none seem to work.
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

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.

attributes.datasource can work to when passing variables

Related

No data in Sitecore Experience profile

I've set up a local Sitecore environment with all sql and mongodb db's working.
Except i do not get any data in the experience profile (contacts)
I see that tracking_contact db is empty in mongo and also the analytics index folder is empty.
Other functionalities like experience analytics work fine.
Are there any extra configurations necessary?
The Experience Profile runs on the Analytics index. If there is no index, there will be no data shown.
Try to rebuild the index if it's not there.
There is an admin tool for rebuilding the reporting db & analytics index: /sitecore/admin/RebuildReportingDB.aspx
When you run the tool you must setup a secondary reporting db first.
Just attach another empty analtyics database to your local SQL and name it something like analytics_secondary and configure its connectionstring.
Then rebuild the reporting db and after that data should appear in your Experience Profile.
The index should be constantly refreshed by the aggregation framework (i.e. you should not need to rebuild) so if that is not happening, something is wrong in your configuration.
When working with xDB you'll need to identify a user to get it to appear in the experience profile section otherwise they will be anonymous.
Try using this code here to create a contact:
https://github.com/ianjohngraham/CoreBlimey.Utils/tree/master/CoreBlimey.Utils/xDB%20Contact%20Creator
And then call the end session by using the button.
If everything is setup correctly then the contact you created will appear in MongoDB and in Experience Profile.
If you are still not getting any data then you could try these things:
Ensure you have the <sc:VisitorIdentification runat="server" /> control for asp web forms layout
the #Html.Sitecore().VisitorIdentification() control for MVC layout
Make sure you disable robot detection by changing this setting <setting name="Analytics.AutoDetectBots" />
Charley,
I also had the similar problem in past, so what I found was, it was not working in my local, but when i put it stage server it shows data to me. So same may apply to you also.
Also without "#Html.Sitecore().VisitorIdentification()" in your Layout tracking is not possible.
Hope this will help you.
cheers!!

CFML on BlueDragon datasource could not be found or was invalid

This is the error I get when trying to open any of my CFML pages that work with the database:
Type Database Detail The datasource thenightclub could not be found or was
invalid Extended Info javax.naming.NameNotFoundException: Name thenightclub
is not bound in this Context.
Giving credit to CFML_Developer for the comment:
"I am sure you may have deemed DSN to something else. It is DataSource Name which you need to specify in your BlueDragon admin. Log in to BD admin, create a datasource with the same name your application is expecting it (so that you do not have to make any change in code files.)" – #CFML_Developer

Can't Open Web forms for marketers Form Designer or Security Manager

I have had WFFM running on a Sitecore instance for a while, but it has recently stopped working. When I go to "Form Designer" on an existing form, I get the standard Sitecore "The requested document was not found" page.
Requested URL: /applications/modules/web
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
Note that the requested URL is stated as /applications/modules/web instead of /applications/modules/web forms for marketers.
A lot of development has occurred on this site recently, so I'm not sure when exactly this started happening.
Additional: info:
Folder and file permissions are correct.
I've tried reinstalling the WFFM package, and made sure that all the files are in place.
Several processors have been added to the HttpBeginRequest pipeline, but I removed them all to test if they were the cause - they weren't.
I haven't upgraded Sitecore since WFFM was working and the version is correct.
No errors are logged
EDIT
This also seems to be affecting the Sitecore Security Editor:
Requested URL: /appl
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
EDIT 2
Further investigation with this is making me think it is related to the Requested URL. I originally thought the the "Not found" page was displaying the requested url incorrectly. However, if I attempt to goto mysite.com/sitecore/shell/applications/fake folder with spaces/fake page with spaces I get this error message:
Requested URL: /applications/fake folder with spaces/fake page with
spaces
User Name: sitecore\admin
Site Name: shell
If the page you are trying to display exists, please check that an
appropriate prefix has been added to the IgnoreUrlPrefixes setting in
the web.config.
As you can see the Requested Url is correct in the error message. So in relation to my problem, I think maybe Sitecore is requesting the wrong URL in the first place.
Additionally if I go to the go the following url by typing directly into the browser, then the Security Editor opens as expected:
mysite.com/sitecore/shell/Applications/Security/User-Editor
This is quite old now but I thought I'd provide an update for anyone else who encounters the problem.
Unfortunately, Sitecore support weren't able to help beyond pointing out that setting the addAspxExtension attribute to 'true' in the link provider seemed to solve the problem. This may have been acceptable except that extensionless URLs were important to the customer.
In the end I had to amend my link provider so that addAspxExtension is set to 'true' in the web config, and then I set it to false inside the GetItemUrl method for specified sites only.
So now whenever the context site is 'Shell' or 'Admin' etc, the extensions are added by default, but switched off in my main website.
Of course, this is a work around. I still don't know how to actually fix the problem
So the first thing that I am going to tell you is that I suspect that there is something wrong with your site declaration for Sitecore Modules. In your web.config, there's a site declaration for "modules_shell" and "modules_website". Those are where the code files that run the modules are usually located... a shell folder to run the parts that run in the Sitecore shell and a web folder to run the part that is accessed by the externally facing site. Please check your site declarations (and the form.config file) to make sure that you're not in live mode or something like that. I would definitely say that this is where you should start looking.
The next thing is to say that your comments about Sitecore not serving a url in the /sitecore/shell directory is really not surprising. Sitecore processes all requests unless you specifically tell it to ignore requests (like setting it in the IgnoreUrlPrefixes in web.config), it's going to try processing it. Like going to /sitecore/shell/applications gives me a layout error because it doesn't have anything set to handle that request. Now your error suggests that there is something wrong with Site declarations.. however, even if they were all right, it still wouldn't work.

Determine Database Type from ColdFusion Data Source

I have web site with source code in ColdFusion. How can I find out which database is used and where is database files?
Thank you!
Also, I haven't access to CF Admin.
Assuming you are using CF8 or later:
If you have the datasource (which you can see in the CFQUERY/CFSTOREDPROC) you can use cfdbinfo to get database information.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_01.html for details.
Search through the entire codebase for instances of the tag <CFQUERY> (and additionally <CFSTOREDPROC>).
Look at the value entered into the attribute "datasource", collect them all up.
If you have access to CF Admin:
Log into the ColdFusion Administrator, navigate to Datasources, and match the datasource names with the ones you found in your search.
Examine the DSN settings. They are your databases.
If you do not have access to CF Admin:
Pass the names of the datasources to <CFDBINFO> and dump out the results (thnx to TheCycoONE)
Shawn hit it: you'll have to get into the ColdFusion Administrator's Datasource settings. Find the name of the datasource in your Application.cfm/cfc/direct in the query, then in click that DSN in the administrator. It should tell you which db (type) connector it's using, and the general location.

Coldfusion Beta 2 CFC Mapping

I am working with the new CFBuilder 2 Beta, and I notice that there is a new feature that is supposed to be able to check my CFC's and give me "Intellisense" on them but I keep receiving and error that says unresolved component.
I have all my mappings set up properly in my CF Administrator and I added the server in CFBuilder and I am able to see the DSN's in the RDS Dataview, but it does not appear as if it is pulling in the mappings for example.
var dates = createObject("component","com.utils.dateFunctions");
The com is mapped to C:\Inetpub\com in my Admin mappings, but again I get that warning when I do createObject.
Is there perhaps a step I missed inside of CFBuilder to get this to work?
I was thinking it should be pulling in my mappings already...
Try this link by the ColdFusion Builder Team, explaining CFBuilder and finding CFCs.
http://blogs.adobe.com/cfbuilder/2011/03/where-coldfusion-builder-finds-my-cfcs.html