I think that file path is a bit of a "red herring" - it might refer to the path on the machine used by Adobe to compile the ColdFusion Administrator API code. The issue is more likely that you are trying to use some ColdFusion Administrator API method without first having passed valid credentials into the API. You have to create an object using the adminapi.administrator CFC, then call the login() method of the object passing a valid username and password that has been granted access to the API. Then you can create an adminapi.datasource object and use its methods.
You might need to do something like this:
<!--- Log into ColdFusion Admin API ---> <cfset adminObj = createObject("component"),"cfide.adminapi.administrator")> <cfif not adminObj.login("**username**","**password**")> <cfthrow message="invalid admin password"> </cfif> <!--- Create a datasources object ---> <cfset dsObj = createObject("component","cfide.adminapi.datasource")> <!--- Get datasources from datasource API ---> <cfset dsFull=dsObj.getDatasources()>
Hope that helps,
I agree with Carl. E:/cf10_final/cfusion/wwwroot/ is just a remnant of the file system that the Coldfusion Team used when building Coldfusion 10. At least that is what I think it is. Such a path keeps popping up in error messages in Coldfusion versions as far back as I can remember. I wonder why they let it stay. It gives a shoddy impression.
In any case, we should focus on discovering the cause of your error. For a start, the error message tells us something is going wrong in the pages named update.cfm. Could we see the code?
One of the paths even has a double forward slash: /var/www/vhosts/website/httpdocs/m//update.cfm. What Is the intention here?
Carl mentions a username/password pair. One way to test its validity, without code, is to access the API through the browser, as follows (modify the URL to your needs):
This of course assumes that you have enabled RDS.
Thanks for the suggestion guys. This worked great until some changes in CF10 I believe. BkBk, I can post some code this evening but I think I figured it out. I changed my CF password and didnt update the area it pulls the password from.
My issue now is I am getting this error -
Element mysql is undefined in a Java object of type class coldfusion.server.ConfigMap.
It would of course help to know what you were doing when you got the error.
Are you trying to create a datasource with Coldfusion code? If so, why not do it the simple way, in the Coldfusion Administrator?
Alright so I found out the issue lies within setting my driver type when creating a DSN. Right now I have it set at myObj.setMSSQL(driver="mysql5",... but apparently this does not work with the latest coldfusion. And I am not using the CF Administrator because this is tied to a form I use for creating multiple pieces to a home brew content system at once.
You apparently mix the drivers. Use either
setMSSQL ( driver="MSSQLServer", ...)
setMYSQL ( driver="MySQL", ...)
I don't understand. Could you please give us a clue why you mark the post as 'correct'?