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

ColdFusion 2018 - Could not initialize class coldfusion.tagext.io.FileUtils after Windows updates

Explorer ,
May 21, 2021 May 21, 2021

Copy link to clipboard

Copied

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.

Views

1.1K

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , May 22, 2021 May 22, 2021

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 /

...

Votes

Translate

Translate
Explorer ,
May 21, 2021 May 21, 2021

Copy link to clipboard

Copied

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 org.apache.tika.config.TikaConfig.getDefaultConfig(TikaConfig.java:410)
at coldfusion.tagext.io.FileUtils$1.run(FileUtils.java:178)
at coldfusion.tagext.io.FileUtils$1.run(FileUtils.java:174)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at coldfusion.tagext.io.FileUtils.<clinit>(FileUtils.java:173)
... 48 more
Caused by: org.apache.tika.exception.TikaException: Specified Tika configuration not found: tika-config.xml
at org.apache.tika.config.TikaConfig.getConfigInputStream(TikaConfig.java:317)
at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:254)
at org.apache.tika.config.TikaConfig.getDefaultConfig(TikaConfig.java:405)
... 52 more

Votes

Translate

Translate

Report

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 ,
May 22, 2021 May 22, 2021

Copy link to clipboard

Copied

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.

 

Any joy?

 

 

Votes

Translate

Translate

Report

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
Explorer ,
May 22, 2021 May 22, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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
Explorer ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

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?

Thanks!

Votes

Translate

Translate

Report

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
Explorer ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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 ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

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
Documentation