After this slew up ACF updates we're running into ...
# adobe
r
After this slew up ACF updates we're running into an error with some code that had been working previously... in cfscript we're doing a
try{ callAFunction() } catch ( any e ){ if( Left(e.message, n) == stringhere ) { ... } }
and it's now throwing an error of
java.util.MissingResourceException: Can't find resource for base name coldfusion/runtime/CfJspPage.NoSuchTemplateException.properties
on the
if
conditional (which seems most likely to be the
e.message
bit). Did the argument passed to
catch
change?
j
Which version of CF are you on? What did you upgrade to? And which version of Java are you running?
r
2021, we are on update 9 now, Java 11.0.19
r
what version did you update from (where the code was working as expected)?
r
There were three updates that came out pretty quickly one after the other. We typically install security updates the day they come out (especially given that they were priority 1). So the last time I know it worked for certain would have been on update 6. But given the timing and how often our end users hit this page my guess would be that it was working on Update 8 as well, and that update 9 is what broke it.
r
have you tried clearing the template cache and getting rid of any saved class files so that CF has to recompile everything? (admittedly a shot in the dark…)
r
CFAdmin isn't loading, with a similar error. Oy vey.
j
Is this a LINUX install?
r
Yes
j
Were the correct permissions applied to the new Java version?
r
Restarting the instance, then programmatically resetting the cache (From some other CF code) seems to have cleared out the issue.
👍🏻 2
👍 1
Classic solution. Sorry I didn't try it before bothering y'all 😬
Thanks for the help 🙂
r
no worries! we’ve been there…
d
@rodel30 What are you doing when you're "programmatically resetting the cache"? Is that aa code equivalent to Clear Template Cache in cf admin?
r
Yeah, looks like we borrowed a function from somewhere:
Copy code
<!--- Railo/Lucee has its own built-in function for clearing the template
cache.  Adobe ColdFusion uses the Admin API. --->
<cffunction name="clearTemplateCache" returntype="void" output="no">
  <cfargument name="cfadminPassword" type="string" required="true">
  <cftry>
    <cfif IsDefined('pagePoolClear')>
      <cfset pagePoolClear()>
    <cfelse>
      <cfset CreateObject('component', 'CFIDE.adminapi.administrator').login(arguments.cfadminPassword)>
      <cfset CFIDE = CreateObject('component', 'CFIDE.adminapi.runtime')>
      <cfset CFIDE.clearTrustedCache()>
    </cfif>
    <cfcatch>
      <cfthrow message="Failed to clear ColdFusion Trusted Template Cache. Check that CFadmin password matches."
        detail="#cfcatch.message#: #cfcatch.detail#">
    </cfcatch>
  </cftry>
</cffunction>
d
@rodel30 Interesting. And which versions of CF is it (still) working with, leaving aside any java version weirdness?
r
My recollection is that we have had this since at least CF9 (though possibly had it in 7 as well). Then it worked on 11 and 2021. I would expect it to work on 10, 2016, and 2018. And I would be surprised if it was dropped in 2023.