G’day:
I’m troubleshooting some code for someone on Twitter
(https://twitter.com/cyndi104/status/600783012775747584).
Running the code on ColdFusion, I get the issue as per what Cyndi was
seeing.
I wanted to see how Lucee handled the same (in an attempt to plug Lucee to
her), but I can’t seem to get REST to work on Lucee (4.5 or 5).
Here’s what I did:
- The three files in her gist are in this dir:
D:\Websites\www.scribble.local\shared\junk\cyndi - In Lucee server admin, I set up a REST mapping - /cyndi - pointing to
that dir. I opt for it to NOT be the default app - I also check the option to list REST services if I browse to /rest
- I have modified her code so that the URLs
are http://#CGI.http_host#/rest/cyndi/, not http://www.yoursite.com/
These are the steps I took on CF, and they work.
On Lucee, when I browse to /rest, I get this:
Available sevice mappings are:
- /rest/cyndi
So far, so good. If I browse to /rest/cyndi, I get:
no rest service for [/cyndi] found
Perhaps fair enough, as the end points have specific names in that code,
and I’m not actually browsing to them
However if I browse to one of the defined endpoints,
eg: /rest/cyndi/MyHandler1/MyTest/true, then I get this:
Lucee 4.5.0.042 Error (missinginclude)MessagePage …/…/…/…/…/…/null
[C:\null] not foundJava StacktracePage …/…/…/…/…/…/null [C:\null] not
found
at lucee.runtime.PageSourceImpl.loadPage(Unknown Source):-1
at lucee.runtime.component.ComponentLoader.loadComponent(Unknown
Source):-1
at lucee.runtime.component.ComponentLoader.loadComponent(Unknown
Source):-1
at lucee.runtime.rest.Mapping._init(Unknown Source):-1
etc.
Same on Lucee 5.
It looks very much to me like a bug in Lucee, but given what a drama
ColdFusion has managed to maker out of /rest services, it would not
surprise me if Lucee had non-obvious “idiosyncrasies” too.
Is there something else I need to do?
Cheers.–
Adam