tracker issue : CF-3184293

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

CFTRACE does not work when invoked as web service

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Henry Ho / Henry Ho (Henry Ho)

Created: 05/07/2012

Components: Web Services

Versions: 9.0.1

Failure Type: Crash

Found In Build/Fixed In Build: 9.0.1 / 288657

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Windows 7

Vote Count: 0

Problem Description:

With CFTRACE left in code, the web service will throw exception.

Steps to Reproduce:

add CFTRACE to a remote function and invoke it.

Actual Result:
  Variable DEBUGGER is undefined. 

coldfusion.runtime.UndefinedVariableException: Variable DEBUGGER is undefined.
	at coldfusion.runtime.CfJspPage._get(
	at coldfusion.runtime.CfJspPage._get(
	at cftrace2ecfm1786375826.runPage(E:\cf9_final\cfusion\wwwroot\WEB-INF\cftags\trace.cfm:194)
	at coldfusion.runtime.CfJspPage.invoke(
	at coldfusion.filter.CFVariablesScopeFilter.invoke(
	at coldfusion.tagext.lang.ModuleTag.doStartTag(
	at coldfusion.runtime.CfJspPage._emptyTcfTag(

Expected Result:
      run normally, and trace the result to trace log

Any Workarounds:
      don't use cftrace?

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

Watson Bug ID:	3184293

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



Same bug as: please consider fixing this.
Comment by External U.
19505 | May 07, 2012 09:32:44 PM GMT
This is tested on CF9,10 and 11 and was able to repro the issue. Test code to repro : #trace.cfm: <cfinvoke method="testFunc" returnvariable="returnVal" webservice="http://localhost:8500/bugs/CF-3184293/book.cfc?wsdl"> </cfinvoke> <cfdump var="#returnVal#"> #book.cfc : <cfcomponent> <cffunction name="testFunc" access="remote" returntype="string" output="no"> <cfset varvalue="haha"> <cftrace var="varvalue" text="doing equivalency check for variable" category="vars" inline="no"> <cfreturn "testString11"> </cffunction> </cfcomponent> To repro this case please enable request debugging output on CFadmin UI and also add IP as mentioned by Vamsee below. Another observation(made by Paul ): When the component's function was invoked using cfinvoke(through "component" attribute) instead as web service this issue did not occur.
Comment by Akhila K.
19506 | January 03, 2014 04:37:50 AM GMT
CFTrace will not work for web service. We cannot send the debug information as part of SOAP response.
Comment by Paul N.
19507 | February 19, 2014 02:40:06 AM GMT
Can't the cftrace be logged when being the called remotely to the out-log? If you can't do it, at least have it ignored when being invoked remotely? E.g. check if Variable DEBUGGER is defined first in your code, and if it's not defined, then don't do anything?
Comment by External U.
19508 | February 19, 2014 01:23:23 PM GMT
While trying to trace, if the debugger is not available, we are not trying to trace the request. Instead we will return immediately. This will prevent the debugger is undefined error.
Comment by Paul N.
19509 | February 20, 2014 10:23:13 AM GMT