Copy link to clipboard
Copied
Getting the error for all rest services on a subset of our production servers:
Cannot resolve PropertyFilter with id 'coldfusion.runtime.Struct'; no FilterProvider configured
Appears to be the same error as:
Solved: API Error: Can not resolve PropertyFilter with id ... - Adobe Product Community - 14335256
Which is marked Solved but does not seem to be solved. Ticket that was created related to that post was closed by tech support and not resolved.
Wierdly this only occurs on half of the 4 nodes in our cluster. All servers share same configuration and same code base from shared NAS.
When I hit them directly I can see 2 consistantly return the error:And the other 2 nodes consistantly return expected JSON output.
Of course when we hit them load balanced we effectively get random failures depending on what server I am sticky to.
I confirmed there are no trailing slashes as called out in the article above:
This has persisted through mulitple restarts and at least 1 CF patch.
Currently on Enterprise version: 2023,0,13,330759
Runing on UNIX: 5.14.21-150500.55.103-default
Tomcat Version 9.0.93.0
Hardware is Virtual VMWare with 16MB Ramp Intel Itanum 2 Processor 2.14 GHz 4 CPU count.
Rest Path: rest
Root Path: /ime/pime/a01shared/web/vhosts/ivesweb/current/htdocs/rest
Service Maping: ives
Default: NO
Host: Port: BLANK
Sample call: https://server_x.usps.gov:9445/rest/ives/v1/lwop/func/1/dt/20240602
Source code attached.
Any help would be appreciated
David, with regard to the suggestions in that other thread, did you proceed beyond just its one marked answer to try also the suggestion the OP (Steve) had made there: to clear the cfclasses and felix-cache folders? Even if you had, not that I just added another suggestion there,.to clear also the rest-skeletons folder, a sibling of cfclasses. More details in my comment there as well as the one from Steve which I point to there.
Hope you'll confirm whether it works or not.
Copy link to clipboard
Copied
Weird indeed.
Examine all the ColdFusion logs and share every piece of information you find about the error.
Copy link to clipboard
Copied
I cant find anything in the logs that is tied to this. I can make the call and see nothing in cfusion/logs or our various tomcat coldfusion or httpd logs.
Copy link to clipboard
Copied
I don't know what the cause of the issue is, but have found something that might be a clue. It is in the ime_lwop_api.cfc code:
remote struct function getLWOP(
string funcno = '' restArgSource="path",
string dt = '' restArgSource="path"
) httpmethod="GET" produces="application/json" restpath="func/{funcno}/dt/{dt}"
{
/**************************/
/***** etcetera *****/
/**************************/
restSetResponse(LOCAL.resp);
return local.resp.content;
}
The method getLWOP, besides calling restSetResponse(), has a return type(struct). That is incorrect. If the method calls restSetResponse(), then the return type has to be void.
When you use restSetResponse() together with return, ColdFusion may usually ignore the function's return value and use instead the response set by the function restSetResponse. But that is perhaps no longer guaranteed, hence the error. In which case, you will have to delete the return-line.
Copy link to clipboard
Copied
Will make the correction and report back Friday its wierd that it works sometimes. But I guess I have consistently made that error, so it might explain why none of our restful services work when they dont work.
Copy link to clipboard
Copied
Interestingly when I deployed with the void returns and just the restSetResponse it did not start working, but I got a different error condition. No more struct error but just an empty json response.
Instead of
Cannot resolve PropertyFilter with id 'coldfusion.runtime.Struct'; no FilterProvider configured
I am just getting
{}
Copy link to clipboard
Copied
David, with regard to the suggestions in that other thread, did you proceed beyond just its one marked answer to try also the suggestion the OP (Steve) had made there: to clear the cfclasses and felix-cache folders? Even if you had, not that I just added another suggestion there,.to clear also the rest-skeletons folder, a sibling of cfclasses. More details in my comment there as well as the one from Steve which I point to there.
Hope you'll confirm whether it works or not.
Copy link to clipboard
Copied
We have not done any of the deletes as we were hoping to find root cause first. Will try to get a CR through to test clearing all three directories and will report back if it clears the issue (at least temporarilly). Can add my findings to the other thread as well.
Copy link to clipboard
Copied
Well, the point here is that there can often be unexplained (and seemingly inexplicable) errors which are solved ONLY by the clearing of those folders (sometimes only one of them--but it's not going to be obvious WHICH one).
The goal with my suggestion was to make sure first you'd considered more from that other thread than just the slash suggestion (since it didn't help you), and then to suggest this 3rd folder to delete if you'd tried the other two to no avail. And you'll see I shared the same suggestion (about this third folder) there, to help readers who find that thread.
As always, just trying to help.
Copy link to clipboard
Copied
I can probably do the deletes one by one... restart and retest after removing the server from the load balancer. Is there an order you would like me to do to get the most information for the community?
Copy link to clipboard
Copied
Oh cool. Sure, that would be optimal for identifying which "does the trick", if any.
As for the order, nope, no significance (I'd think). Though I will say that if after doing each (one at a time) things still fail, then as a final test delete all 3 at once--to rule out any inconsistencies between them.
BTW, while you MUST stop cf to delete the felix-cache cache, you'll find you can delete the other two while cf's running...but don't do that. There could be classes loaded into cf's memory (while running) such that deleting the classes (cfclasses or rest-skeletons) has no obvious impact...because cf keeps using the one in memory (until cf is stopped).
It's little things like that (as well as the matter of multiple instances, as in bring up in the other thread) which sometimes lead people to declare that some offered solution "doesn't work"...when instead it was a process problem, sometimes not warned of in many online resources. That's how a reply like this gets wordy, adding such cautions to beware.
Copy link to clipboard
Copied
So we cleaned out rest-skeletons first and on the first of our two bad nodes that was sufficent to get a proper resoponse.
We went to do the same on the second bad node but that didnt fix it after we restared. We then proceeded to delete cfclasses and restart and then it was working again.
We didnt bother deleting felix-cache after they were working with out that step.
So I guess no definitive answer on what directories should be cleaned and let CF recreate but cleaning did work.
But we are up and running on all 4 nodes just fine again. So I appreciate everybodies help!
Copy link to clipboard
Copied
One crucial point, in addition to @davidc83157381 's instructive comment:
restSetResponse()
then the method should not return anything. It should have void return-type.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now