Skip to main content
Participating Frequently
November 4, 2025
Question

Cache initialization failed due to following reason: Error configuring from null.

  • November 4, 2025
  • 2 replies
  • 257 views

Hi,

We are experiencing this cache issue, we have 4 instances and one instance, we have this issue, 

We manually cleared the cache and uncheck all the cache options and restarted the service but still we got issue, 

Any help would be greatly appreciated

<cfquery name="abc" datasource="#xyz#" cachedwithin="#createtimespan(0,1,0,0)#">
9 : SELECT		test_column
10 : FROM        tast_table

 

 

Error : 

Cache initialization failed due to following reason: Error configuring from null. Initial cause was Cannot invoke "java.net.URL.openStream()" because "url" is null

Stack Trace
at cffacilities2ecfm1461612999.runPage(D:/web/live/mercury/view/facilities.cfm:8)

coldfusion.tagext.io.cache.CacheExceptions$CacheInitializationException: Cache initialization failed due to following reason: Error configuring from null. Initial cause was Cannot invoke "java.net.URL.openStream()" because "url" is null
	at coldfusion.cache.ehcache.GenericEhcache.getCacheManager(GenericEhcache.java:418)
	at coldfusion.cache.ehcache.GenericEhcache.createCache(GenericEhcache.java:457)
	at coldfusion.runtime.ApplicationScope.getDefaultQueryCache(ApplicationScope.java:551)
	at coldfusion.runtime.AppHelper.getDefaultCache(AppHelper.java:1339)
	at coldfusion.sql.Executive.getCachedQuery(Executive.java:1753)
	at coldfusion.tagext.sql.QueryTag.setupCachedQuery(QueryTag.java:1111)
	at coldfusion.tagext.sql.QueryTag.startQueryExecution(QueryTag.java:869)
	at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:822)
	at cffacilities2ecfm1461612999.runPage(D:\ABC\xyz.cfm:8)

    2 replies

    Charlie Arehart
    Community Expert
    Community Expert
    November 4, 2025

    @ponnada40, while you may await someone offering "the answer", I'll ask some clarifying questions, which may help lead to it. And the first three relate to the only other occasion of someone raising this error. If it's not that, I offer still others:

    1. If you had recently applied a cf update, was that instance updated separately from the others for any reason?
    2. Either way, were there any errors in the update log? Are you familiar with where to look? 
    3. If nothing else, are there any errors during startup of the instance, in its coldfusion-out.log? Especially while packages are being started? Especially the cache one? 
    4. As for this instance in question, was the caching feature working previously? Or might this be the first time you tried using caching in a query on that instance?
    5. If it was running until recently, what changed since when it was working? Beyond the update questions above, beware that some changes don't take effect until a cf restart, so you can't look at just "what was changed the day it started failing": it could have been a change made well before that, after the last prior restart. You can see when that was using the server.log, among others.
    6. Compare especially the ehcache.xml between the working and failing instances. It's in the lib folder under each instance's folder
    7. You may even want to compare other aspects of the admin configuration between them 

     

    I'll add that doing all the above may seem daunting, but someone experienced doing them could do it all quickly. It's just not easy to communicate here EVERYTHING to consider in each task. 

     

    If you don't get resolution soon either on your own or from our help here, and if you need this solved ASAP (rather than waiting hours or days), I'll add that I can help solve this via remote screenshare consulting--likely in as little as a half hour, maybe less. For more on my rates, approach, satisfaction guarantee, online calendar and more, see the consulting page at carehart.org.

     

    Let us know if you solve it or have answers (you can just offer the numbers) or might offer feedback on the above. 

    /Charlie (troubleshooter, carehart. org)
    ponnada40Author
    Participating Frequently
    November 5, 2025

    Hi @Charlie Arehart ,
    Thank a lot for your response, few details below, 
    Current Version : 2023.0.14.330784 
    Last hotfix : 12-May-25

    Installation: Successful.

    508 Successes
    0 Warnings
    0 NonFatalErrors
    0 FatalErrors 

    I have over 13 years of CF experience but never experience this type of issue, and I am not fully familer with CF installation issue, However I am trying to assist customer
    I have checked the coldfusion-out.log and every packege is running and no issue with cache packege ([main] - Package caching started...)
    Post migrating CF10 to CF23, I have noticied this cache issue on last month while performing end to end testing, this issue might be there previously but not tested or it just break last month 
    Verified ehcache.xml file and no differences  in both working and non working cf instances 
    If this issue not resolved in short time then I will recommened customer to contact carehart.org 
    Thank you very much, will keep you updated

    BKBK
    Community Expert
    Community Expert
    November 5, 2025

    @ponnada40 , Thanks for the updates. I agree with you that this is a rare error. Your investigation shows that there is a fundamental mistake somewhere. By fundamental I mean a small mistake that has easily been overlooked.

     

    For example,

    1.  What is the relation between the pages D:/web/live/mercury/view/facilities.cfm and D:\ABC\xyz.cfm? Do they both have the same cachedWithin-query? Do they run simultaneously or one after the other?

    2.  Open the Administrator of the particular ColdFusion instance. Go to the page Server Settings > Caching.
      Select EhCache as the caching engine. Press the button "Submit Changes", and restart the instance. 

    3.   Run the code:
    <cfdump var="#CacheGetEngineProperties()#" >

    The result should be something like 

    4. Now, run the cachedWithin query once again. Does it now run without errors?





    ponnada40Author
    Participating Frequently
    November 4, 2025

    Additional details : Coldfusion version 2023 (Production)
    Windows server 

    BKBK
    Community Expert
    Community Expert
    November 4, 2025
    quote

    We manually cleared the cache and uncheck all the cache options ...


    By @ponnada40

    When you say that, I assume you have used cacheClear() to clear the cache and you have unchecked cache settings in the ColdFusion Administrator. I don't think these actions are necessary. That is because they are not related to the cache URL.

    The developer is not meant to access the cache URL. ColdFusion is itself responsible for instantiating the cache URL object internally. So, what could be the reason why the URL is null?

     

    I suspect two possible causes:

    1.  The ColdFusion instance either misses the configuration file \{INSTANCE_NAME}\lib\ehcache.xml or the file is corrupted. I have provided a sample of the default file. You may use it to test (after restarting ColdFusion, of course).
    2.  Let's assume 1. is not the cause. Then there is a probably a bug in your ColdFusion 2023 build. Not likely, but not impossible either. If your build is not up to date, then consider installing the latest ColdFusion 2023 update (Update 16)
    BKBK
    Community Expert
    Community Expert
    November 4, 2025

    Post-posting remark: I saw Charlie's post only after submitting mine. So there might inevitably be some duplication here and there.