tracker issue : CF-3119366

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

REST Service Refresh fails with block-commented methods in script CFC

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Tuttle / Adam Tuttle (Adam Tuttle)

Created: 02/21/2012

Components: Web Services, REST Service

Versions: 10.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: Public Beta / 281801

Priority/Frequency: Major / All users will encounter

Locale/System: English / Mac 10.7 64-bit

Vote Count: 5

Problem Description:

Using block-comments (/* commented */) to comment out a method in a script-only CFC that is a rest service causes the REST refresh to fail.

The failure message is also not helpful. It reports:

>Unable to refresh REST service.
>Application {serviceMapping} could not be initialized.
>Reason: The application does not contain any rest enabled CFCs.

Steps to Reproduce:

Place this CFC into a working REST api and refresh -- the refresh will fail. https://gist.github.com/d3f4803bfb405cd0e851

Note that if you use line comments (//comented) the refresh will succeed and everything will work as expected. Block comments are quirky:

/*
*/
-- works

/**/
-- fails

/*

*/
--fails

/* test */
--fails

/*
a
b
c
*/
--works

/*
 a
 b
 c
*/
--fails (this one has a single space before each line of the comment)

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

Watson Bug ID:	3119366

External Customer Info:
External Company:  
External Customer Name: Adam.Tuttle
External Customer Email:  
External Test Config: My Hardware and Environment details:



MacBook Pro

OSX Lion

CF10 Standard Install

Attachments:

Comments:

I forgot to include: The CFC still works as a SOAP service, and the CFC explorer can examine it and do its thing... so it is clearly REST-service-refreshing specific.
Comment by External U.
20697 | February 21, 2012 09:42:04 AM GMT
Its a blatant issue and should be resolved. standard commenting methods should be available at all times.
Vote by External U.
20705 | February 21, 2012 09:42:42 AM GMT
This should be fixed as it is a standard way of commenting out code.
Vote by External U.
20706 | February 21, 2012 10:03:57 AM GMT
This feature needs to support the standard comment syntax.
Vote by External U.
20707 | February 21, 2012 11:43:32 AM GMT
Big issue. Comments should never mess with functionality.
Vote by External U.
20708 | February 21, 2012 02:14:12 PM GMT
This is not reproducible. I tried all the combinations you said but I am perfectly able to refresh this. Can you please clearify few things 1. Which build are you using? If its not the latest, can you please check in Public Beta? 2. Any webserver configured? If yes then which one? 3. Do you have any other (error free)REST cfc in that same folder? If no, can you please check once with keeping one?
Comment by Milan C.
20698 | February 22, 2012 12:34:46 AM GMT
1. The build I'm using is the public beta. Server version is listed as ColdFusion 10,281485. 2. Using Apache 2.2.20 3. This is the only REST CFC in the folder, but there is one other file that is a .cfc.bak, and a CFC that I'm using as an event gateway handler. I can share a zip if it would help.
Comment by External U.
20699 | February 22, 2012 07:57:42 AM GMT
Huge barrier to development productivity
Vote by External U.
20709 | February 22, 2012 05:48:09 PM GMT
Yes, please share a zip of the cfc's you are using. It will be of great help. Thanks.
Comment by Milan C.
20700 | February 28, 2012 08:33:31 AM GMT
http://dl.dropbox.com/u/3831772/cfbugCF-3119366.zip
Comment by External U.
20701 | February 28, 2012 01:37:46 PM GMT
Thanks for providing the component. This is reproducible and we will try to fix it. Please also tell if I can use this component in my regression suite for future testing. Thanks.
Comment by Milan C.
20702 | March 07, 2012 12:58:14 AM GMT
Chandan, please look into this.
Comment by Paul N.
20703 | March 08, 2012 03:36:53 AM GMT
This was not REST related bug but a general bug. If you try to fetch the cfc using cfc explorer then also it throws error. This has been fixed. Now in REST also it will work fine.
Comment by Milan C.
20704 | March 08, 2012 11:00:43 AM GMT