0

In a ColdBox application I have this code in my main handler's onException function:

getModel('JVMUtils@cbcommons')

In the past month I've seen this throw the error that it can't find it 17 times. During the same time, the application has (sadly) had hundreds if not thousands of unhandled exceptions that hit the onException handler and this particular line of code and didn't die from not finding the component.

What could cause it to find it nearly every time, but not on these rare occasions?

jinglesthula
  • 4,446
  • 4
  • 45
  • 79
  • Can this be wrapped in a try / catch statement? – James A Mohler Jan 11 '17 at 18:04
  • Actually, we do have a try/catch somewhere a bit further up to log unhandled exceptions that bubble all the way out of the framework, so an additional catch in this spot would still only have the same info. – jinglesthula Jan 11 '17 at 18:25
  • Update: I found one of our developers added this in another application to the wirebox binder mappings which cleared up similar errors: `map("JVMUtils@cbcommons").to("coldbox.system.modules.cbcommons.models.JVMUtils");` I'm going to give that a try here and see how it fares over the next few weeks. – jinglesthula Jan 11 '17 at 18:27
  • I had a similar issue. When I request the page via https, I have no issue. When I request via http, I get the error "Could not find the ColdFusion component or interface". – clarmond Apr 18 '17 at 19:08

0 Answers0