tracker issue : CF-3928707

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

Administrator API login objects not working

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): Jake Hand / Jake Hand (Jake Hand)

Created: 01/27/2015

Components: Security

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Linux CentOS 6.4

Vote Count: 0

Problem Description: 
When using the CF Administrator API our scripts that interact with datasource.cfc fail with this error: coldfusion.runtime.StructBean$FieldAccessException : Java bean field access exception.An exception occurred while calling the get or the put function. FieldName is DATASOURCES. Possible cause ''. The cause of this exception was that:$UnauthenticatedCredentialsException.

We made sure our script is running the Administrator.login() method prior to interacting with datasource.cfc. Also, the same script works on previous versions of ColdFusion. 

Steps to Reproduce: 
Make sure you have CF Administrator authentication enabled within ColdFusion, then try running the following test code within the server's CFIDE system directory:

    adminObj = createObject("component","CFIDE.adminapi.administrator");

    dsObj = createObject("component", "CFIDE.adminapi.datasource");

    datasource = dsObj.getDatasources(dsnname="ExistingDSN");
    sReturn = StructNew();
    sReturn.database = "#datasource.database#";
    sReturn.username = "#datasource.username#"; = "";
    sReturn.port = "#datasource.port#";
<cfdump var="#sReturn#">

Actual Result: Request fails with this error: coldfusion.runtime.StructBean$FieldAccessException : Java bean field access exception.An exception occurred while calling the get or the put function. FieldName is DATASOURCES. Possible cause ''. The cause of this exception was that:$UnauthenticatedCredentialsException.

Expected Result: Successfully dump DSN details

Any Workarounds: You can disable CF Administrator Authentication, and the code will work. This obviously isn't acceptable for production environments though. Please advise.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3928707

External Customer Info:
External Company:  
External Customer Name: Jake
External Customer Email:  
External Test Config: My Hardware and Environment details:

- CentOS 6 64-bit

- CF 11 64-bit Update 3 (11,0,03,292480)

- Apache 2.4


  1. January 30, 2015 00:00:00: 1_cfdsn.cfc


We also have the same code above wrapped in a CFC to be called as a Web Service, and it fails when we call the Web Service too.
Comment by External U.
8710 | January 27, 2015 03:07:21 PM GMT
Hi Jake Could you provide us with the complete coldfusion setup details(such as :development or production profile) & also any specific settings or changes you have done in the CF Admin page. Thanks Preethi
Comment by S P.
8711 | January 28, 2015 04:49:48 AM GMT
Hi Preethi, can I email you a Server Settings Summary? If so, where should I send it?
Comment by External U.
8712 | January 28, 2015 11:12:55 AM GMT
Hi Jake, Is the page <cflogin>-protected? Hi Preethi, Perhaps this is related to #CF-3926238? Thanks!, -Aaron
Comment by External U.
8713 | January 29, 2015 06:05:48 AM GMT
If this is same as #CF-3926238? error message would be "User not authorized to invoke this method". But here we getting a different error.
Comment by S V.
8714 | January 29, 2015 06:10:43 AM GMT
Hi Aaron, the page is wide open (for testing) and cflogin isn't being used. Pavan, I feel silly because I accidentally pasted the wrong error. The error above happens when we place the same code within a CFC and call it as a Web Service. I'm attaching that CFC to the ticket for your reference. This is the exact error we get from running the code within a .cfm template (looks like the same exception though): The error occurred in datasource.cfc: line 65 -1 : Unable to display error's location in a CFML template. at cfdatasource2ecfc1623690062$funcGETDATASOURCES.runFunction(/CFIDE/adminapi/datasource.cfc:65) at cfcfmaxtest2ecfm1345108959.runPage(/opt/coldfusion11/cfusion/wwwroot/CFIDE/adminapi/websvc/cfmaxtest.cfm:7)$UnauthenticatedCredentialsException at at coldfusion.sql.Executive.getDatasources( at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at coldfusion.runtime.StructBean.resolveName( at coldfusion.runtime.Scope.get( at coldfusion.runtime.ScopeSearchResult.searchForSubkeys( at at coldfusion.runtime.NeoPageContext.searchScopes( at coldfusion.runtime.NeoPageContext.searchScopes( at coldfusion.runtime.CfJspPage.resolveCanonicalName( at coldfusion.runtime.CfJspPage._resolve( at coldfusion.runtime.CfJspPage._resolve( at cfdatasource2ecfc1623690062$funcGETDATASOURCES.runFunction(/CFIDE/adminapi/datasource.cfc:65) at coldfusion.runtime.UDFMethod.invoke( at coldfusion.filter.SilentFilter.invoke( at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke( at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke( at coldfusion.filter.FunctionAccessFilter.invoke( at coldfusion.runtime.UDFMethod.runFilterChain( at coldfusion.runtime.UDFMethod.invoke( at coldfusion.runtime.TemplateProxy.invoke( at coldfusion.runtime.TemplateProxy.invoke( at coldfusion.runtime.CfJspPage._invoke( at cfcfmaxtest2ecfm1345108959.runPage(/{cf_home}/wwwroot/CFIDE/adminapi/websvc/adminapitest.cfm:7) ...
Comment by External U.
8715 | January 29, 2015 11:28:54 AM GMT
Hi Pavan, Okay, good point. Also, Jake is asking what email to send setup details to. Hi Jake, I placed the code from the description into /CFIDE/foo.cfm and it runs fine for me on CF11 Update 3 using the "admin" user and its password. I was testing on x64 Windows 8.1 w/ IIS, FWIW. Would it be possible to see if you get the same error on a clean install of CF11 Update 3, prior to making any settings changes? Regarding Adobe's support email, I believe it is cfsupATadobeDOTcom Thanks!, -Aaron
Comment by External U.
8716 | January 31, 2015 03:13:18 AM GMT
Hi Aaron, I can check into a fresh install on another CentOS server later, but we haven't had any problems on Windows x64 either. This only reared its head when we started testing our services on Linux. Also, the engineers emailed me directly about this, and I got them the info they requested. The cfsup address is for the support team, and those messages don't go directly to ENGG. Even with a platinum support contract it typically takes support several weeks just to reply to one of my emails. (Not impressed.)
Comment by External U.
8717 | January 31, 2015 12:52:00 PM GMT
Hi Jake, Ah okay, thanks for that follow-up, then no need to check on a fresh CentOS install on my behalf (I have no way of testing CentOS) - but it may be helpful for Adobe since they likely haven't seen any error message yet. Hi Adobe, Several weeks for a platinum support follow-up email? Adobe, is that as-advertised? Thanks!, -Aaron
Comment by External U.
8718 | January 31, 2015 01:33:18 PM GMT
Hi Jake, I have tried to repro this issue on a couple of linux machines including a fresh machine and was unable to repro this issue. Can you confirm if you are still hitting this issue. Also is there any other scenario where you are hitting the same exception of "$UnauthenticatedCredentialsException" ,but with a different stack trace? Thanks!
Comment by S P.
8719 | September 29, 2015 06:13:53 AM GMT
Hi, we worked around this by just moving the files to a different location, but let me check to see if I can still reproduce the problem or get a different stack trace.
Comment by External U.
8720 | September 30, 2015 06:18:15 PM GMT
Thank you so much Jake, that would be really helpful.
Comment by S P.
8721 | October 05, 2015 05:14:15 AM GMT
Hi, Since we have not got any responses, will be closing the bug. If you do have any concerns, let us know, the ticket would be reopened. Thanks!
Comment by S P.
8722 | November 02, 2015 08:04:56 AM GMT