tracker issue : CF-3348839

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

[ANeff] Bug for: RestInitApplication("/mymapping", "servicename") breaks CF Admin upon CF restart

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 10/18/2012

Components: REST Services

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / 283473

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win All

Vote Count: 3

The repro is simple:

(code and exception messages attached)

1) place app in C:\inetpub\wwwroot (ex: C:\inetpub\wwwroot\Application.cfc|index.cfm|newsservice.cfc)
2) go to http://localhost/?reinit and see "Hello World"
3) in CF Admin, see REST app created as mymapping/news (good)
4) restart CF
5) go to http://localhost/CFIDE/administrator
6) see exception: "The JAX-RS service is not available." (bad)

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

Watson Bug ID:	3348839


External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:


  1. October 18, 2012 00:00:00:


The user is using Application's this.mappings feature to register a REST service. THIS.mappings["/mymapping"] = expandPath("./"); restInitApplication("/mymapping", "news"); As he registers using "/mymapping", the registerd application should take the current directory's absolute path whereas the application is registered using path "/mymapping". "/mymapping" string is literally taken and used to store the application whereas it should have been resolved before storing. If you will go to Administrator, you will see the registered application with path as "/mymapping" which is wrong because "/mymapping" doesn't exist outside that application context. When user restarts the server, we try to resolve all the mappings stored and because "/mymapping" is unresolvable, it throws error and Admin doesn't open up. Workaround: 1. Do not use mappings while registering REST applications. 2. Even if you want to use, wrap them in mappings structure so that the value gets resolved before storing. ex: restInitApplication(this.mappings["/mymapping"], "news");
Comment by Milan C.
17465 | October 18, 2012 04:24:31 AM GMT
Running into this error without using mappings, using absolute drive paths. I cannot find any documentation for how to either restart the JAX-RS service or remove the registered services once the admin is no longer available. The server has update 7.
Comment by External U.
17466 | February 27, 2013 04:38:50 PM GMT
What is the fix? I cannot get into my CF Admin.
Comment by External U.
17467 | April 29, 2013 12:23:33 PM GMT
This *might* be a better work around: In your cfinstall/cfusion/lib folder, you will find many neo-*.xml files. Application settings are stored here. Find neo-jaxrs.xml Make a back up copy. Open it up, and find the XML that defined the 'bad' one, it may look like this: <var name='/Applications/MAMP/htdocs/democode_web/'> <string>RestPreso2</string> </var> Remove it. You may also want to change this: <array length='2'> such that array length goes from N to N-1. Oh, stop CF before you do this, and start it after. This MAY work. Again, backup that XML before you even look at it.
Comment by External U.
17468 | May 02, 2013 09:23:46 AM GMT
a) this ought to have been fixed by now, I reckon; b) CFAdmin in general should not be so unstable as to break if it if doesn't like *data* from its own XML files.
Vote by External U.
17474 | May 02, 2013 09:24:38 AM GMT
I'd like to add to this that if (and I can't tell based on the description) the _entire_ CF admin was blocked, than that is a bad design decision. I can perhaps see some logic in saying, "If one config file is bad we should block the entire admin", but in a practical sense, this is perhaps overkill. Maybe some config files are crucial and the admin *should* abort, but I'd argue that something like this shouldn't bring down the rest of the admin. (Again, if I'm reading right.)
Comment by External U.
17469 | May 02, 2013 09:30:58 AM GMT
I agree with Ray on this one.
Comment by External U.
17470 | May 02, 2013 09:32:20 AM GMT
I cannot fix this JAX-RS bug after doing a REST tutorial. I removed the code that setup the rest and unfortunately cannot figure out how to delete the REST service without getting into the CF Admin... But, I can't get into the CF Admin.
Vote by External U.
17475 | May 02, 2013 10:47:15 AM GMT
I replicated the steps that Adam suggested and it fixed the issue. Thank you! Here's what I did. 1) Stopped the CF service 2) Copied, renamed, saved neo-jaxrs.xml to neo-jaxrs_bk.xml 3) Opened neo-jaxrs.xml and changed <array length='2'> to <array length='1'> 4) Deleted the <var></var> tags and everything between (making sure that the var tags contained the REST service that I had setup) 5) Restarted the CF service 6) Opened CF Admin in the browser... Success.
Comment by External U.
17471 | May 02, 2013 11:19:31 AM GMT
Same issue as idezdebab. Exactly.
Vote by External U.
17476 | May 02, 2013 11:19:50 AM GMT
Verified the bug with update 11. Added the manual test case at //depot/qa/cf/regression/newmanual/REST/Bugs/CF-3348839/ Closing the bug.
Comment by HariKrishna K.
17472 | June 12, 2013 05:27:19 AM GMT
I was able to go into C:\ColdFusion10\cfusion\lib\neo-jaxrs.xml and delete the entry. Then my CF admin came back.
Comment by External U.
17473 | June 03, 2014 06:49:03 AM GMT