Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Nov 04, 2025 Nov 04, 2025

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)
189
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2025 Nov 04, 2025

Additional details : Coldfusion version 2023 (Production)
Windows server 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2025 Nov 04, 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)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2025 Nov 04, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2025 Nov 04, 2025

Thank you @BKBK , We are migrated from CF10 to CF2023, and ehcache.xml file is existed in lib folder, 
As developer, we are not setup the environment however I can verify the settings on readonly mode, we will load the ehcache.xml file

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2025 Nov 04, 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)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 05, 2025 Nov 05, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2025 Nov 05, 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 

BKBK_0-1762345721622.png

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





Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 07, 2025 Nov 07, 2025

Hi @BKBK 

Sorry, Its my bad, I dont want to expose my application urls so I renamed it.
We are not allowed to install and setup the CF environment so Infra team has setup the installation and code deployment, As per my obeservation, they replace the neo_datasource.xml and few other files copied from cf10 to cf24, this might cause the issue

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2025 Nov 07, 2025

@ponnada40 you say now that, "As per my obeservation, they replace the neo_datasource.xml and few other files copied from cf10 to cf24, this might cause the issue".

 

That would be a potentially grave mistake right there. Whoever had that idea of a shortcut isn't considering that the layout of those files can change between cf versions, especially in a jump of 5 versions from 10 to 23.

 

The other alternatives are the car file feature (in the cf admin), the cfsetup feature replacing it (command line tool enabling json export/import), the  "migration wizard" (offered on first launch of the admin, if a new cf is installed on a machine with an old cf), and the cfconfig tool from ortus (which preceded Adobe's cfsetup tool and which can be used for any cf instance, not just those running in CommandBox).

 

But I realize your folks may not want to hear such an admonition. "It's always worked", they may say (for whatever they'd experienced that with). Or "it's too late/too hard to correct now",  they may lament. I don't agree, but I leave you with the above. (And recall my first reply proposed in its point 7 that you might get value comparing the cf admin config of the two instances.

 I elaborate on how to do that in a preso I did on this very topic of migrating cf admin settings safely between cf versions, available at carehart.org/presentations.)

 

One last suggestion related to all that: just keep in mind that this copying of neo files is a potential source of odd errors which may linger and appear in time as seeming "cf bugs". So you would help Adobe or us (when raising another issue) to mention that your folks had made this choice. Otherwise it would be like taking your car to a mechanic complaining about engine problems without telling them that you run your car on alternative fuels. 🙂

 

Finally, somehow the forums have messed up the presentation order of our replies. Later ones appear after earlier ones. Folks reading along might not notice the time stamps and could be confused by the topics seeming to jump around.

 

For example, the next reply here is from me from 2 days ago...and then it shows you responding to it just this morning, like this one above it that I'm now responding to. Oy. 


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2025 Nov 07, 2025
LATEST
quoteWe are not allowed to install and setup the CF environment so Infra team has setup the installation and code deployment, As per my obeservation, they replace the neo_datasource.xml and few other files copied from cf10 to cf24, this might cause the issue


By @ponnada40

No problem, @ponnada40 . You can always pass our suggestions to your Infra team.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2025 Nov 05, 2025

So it's possible then that the use of such caching has never worked on this one instance, right? I'm curious: are all 4 instances running the exact same code? Or does this one run its own?

 

I ask because if they differ, then another thing to consider is your application.cfc/cfm controlling the app in questions. It could be that you specify caching characteristics in that file, which would override whatever is in the admin.

 

All that said, the dump that bkbk helpfully suggested may give useful clarification (as it too would be affected by app-level config). 


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 07, 2025 Nov 07, 2025

Thank you @Charlie Arehart , I will check that

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources