Copy link to clipboard
We are using ColdFusion 2018 on a Windows Server 2016 machine. We upgraded to CF2018 in March and all code has been working fine. Last night, some Windows patches were applied, and today, any <cffile> or <cfdirectory> access causes it to fail with the following error. Other tags seem to work fine. As you can see, we can't even open the administrator tool right now to check other settings.
at java.base/java.lang.Thread.run(Thread.java:834) "Error","http-nio-8500-exec-3","05/21/21","09:35:27","cfadmin","Could not initialize class coldfusion.tagext.io.FileUtils The specific sequence of files included or processed is: E:\ColdFusion2018\cfusion\wwwroot\CFIDE\administrator\index.cfm, line: 442 " java.lang.NoClassDefFoundError: Could not initialize class coldfusion.tagext.io.FileUtils at coldfusion.tagext.io.FileTag.read(FileTag.java:576) at coldfusion.tagext.io.FileTag.doStartTag(FileTag.java:393)
Memory was initially at 95% so we added more and rebooted, but still the same problem, and always only for file tags. We checked that the coldfusion jar file exists and is the same size as on other working servers.
We're going to try rolling back the updates next, but any help or ideas would be appreciated.
Copy link to clipboard
We uninstalled one Windows update KB5003197 but were not able to uninstall KB5001402, and still having the problem. Sometimes (not every time), seeing this error, where should the 'Tika-config.xml' be?
Caused by: java.lang.RuntimeException: Unable to access default configuration
at java.base/java.security.AccessController.doPrivileged(Native Method)
... 48 more
Caused by: org.apache.tika.exception.TikaException: Specified Tika configuration not found: tika-config.xml
... 52 more
Windows update or not, there should be no interaction of this kind between the Windows server and ColdFusion. I am surprised ColdFusion 2018 mentions tika-config.xml.
Have you upgraded ColdFusion 2018 to the latest update level? If not, then that is the first place to start. The current Update is 11.
Let's suppose that you have Update 11 of ColdFusion 2018 and that the problem persists. Still, the problem remains strange. I say this because my ColdFusion 2021 installation contains the file /cfusion/lib/tika-config.xml, whereas my CF-2018 Update11 installation doesn't.
In any case, let's do a debugging experiment. Follow these steps:
1) Ignoring ColdFusion for the moment, install the required Windows updates.
2) Restart Windows.
3) Stop ColdFusion 2018 (if it had restarted automatically). Ensure that the following file exists - /cfusion/lib/tika-config.xml - and that its contents are:
<properties> <service-loader initializableProblemHandler="ignore"/> </properties>
4) Restart ColdFusion 2018.
Thank you so much, this worked! We did already have update 11 applied. It sounds like that file shouldn't even be there in CF2018, and we're not using Solr, but we're just extremely glad this solved the problem.
Any ideas about why this file would suddenly be needed?
On our other servers with the same ColdFusion 2018 update 11, Windows configuration, we don't see that file in the installation.
Is there something that can be configured to use the tika-config.xml file that can be turned off if we're not using it?
Further info for anyone else - we were able to determine that somehow tika.config got into the JVM arguments in cfusion\bin\jvm.config during an upgrade to ColdFusion 2016 update 17 (which also required a java update). On a test server, when we removed the
'-Dtika.config=tika-config.xml' line from the JVM arguments in CF2018, we didn't have the problem.
When we created a .car file for CF2016, we must have included the JVM arguments and then applied them to CF2018, and not restarted the ColdFusion services after that. We had to use the .car because the scheduled tasks weren't copied over. When the Windows patches were applied recently, the reboot restarted the services and probably only then tried to read the (missing) tika-config.xml file.
Hi @aliciam29605858 , thanks for sharing that, hence resolving the mystery. Apache Tika is a widely used library for extracting metadata from various file types. I had imagined something else in your setup required the Tika config file, though not ColdFusion 2018 itself.
In any case, ColdFusion 2018 does use Tika under the covers. The JVM flag combined with the /cfusion/lib/tika-config.xml worked because it simply sets the default. But, as you have discovered, no JVM flag or tika-config.xml file is required. Which makes for a clutter-free setup.