Copy link to clipboard
Copied
Hi all,
since we have installed the latest microsoft server pachtes (KB5041773, KB5041576, KB5041773), our ColdFusion Instances having an issue with the CFSPREADSHEET function.
we are facing the following error message:
Message Could not initialize class java.awt.Font
StackTrace java.lang.NoClassDefFoundError: Could not initialize class java.awt.Font at java.desktop/java.awt.font.TextLayout.singleFont(TextLayout.java:468) at java.desktop/java.awt.font.TextLayout.<init>(TextLayout.java:530) at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:273) at org.apache.poi.ss.util.SheetUtil.getColumnWidth(SheetUtil.java:248) at org.apache.poi.ss.util.SheetUtil.getColumnWidth(SheetUtil.java:233) at org.apache.poi.hssf.usermodel.HSSFSheet.autoSizeColumn(HSSFSheet.java:2220) at coldfusion.excel.Excel.autoResize(Excel.java:1622) at coldfusion.excel.Excel.writeExcel(Excel.java:5613) at coldfusion.excel.ExcelServiceImpl.writeToExcel(ExcelServiceImpl.java:217) at coldfusion.excel.ExcelServiceImpl.write(ExcelServiceImpl.java:171) at coldfusion.tagext.lang.SpreadSheetTag.doStartTag(SpreadSheetTag.java:112) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:5211) at cfSpreadsheetService2ecfc303986293$funcCREATEFROMQUERY.runFunction(D:\inetpub\wwwroot\CSSos\shared\components\SpreadsheetService.cfc:28) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:553) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:310) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4264) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4227) at cforderlines_output_excel2ecfm1024047970.runPage(D:\inetpub\wwwroot\CSSos\wms\orderlines_output_excel.cfm:40) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:257) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:5211) at cforderlines_output2ecfm291895829.runPage(D:\inetpub\wwwroot\CSSos\wms\orderlines_output.cfm:5) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:257) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:5211) at cforderlines2ecfm1081237740.runPage(D:\inetpub\wwwroot\CSSos\wms\orderlines.cfm:159) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:257) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:5211) at cfApplication2ecfc384774176$funcONREQUESTSTART.runFunction(D:\inetpub\wwwroot\CSSos\Application.cfc:251) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:310) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115) at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:286) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:562) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:162) at coldfusion.filter.IpFilter.invoke(IpFilter.java:45) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:151) at coldfusion.CfmServlet.service(CfmServlet.java:231) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:57) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:355) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:450) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834)
Does anyone else experience this issue?
If not, i guess the only solution will be a rollback of those updates on our site.
__PRESENT
Stefan, I'll say first that this is not some common problem. In fact, I find only one other case of it, and that from several months ago.
The workaround that worked for them (it seems) is "simple" but has ramifications to be considered. So I'm afraid this is going to be a longer reply than some may prefer.
1) Indeed, because of the nature of the workaround, before I offer it (and for your sake as well as future readers) I have couple of questions/suggestions.
Copy link to clipboard
Copied
@Stefan31532180qeo0 Please share the jvm arguments from the jvm.config file. No one has reported such issues until now.
Copy link to clipboard
Copied
Doh, Vikram and I were writing at the same time. Well, he wrote his reply faster and I see it arrived a minute before mine below. I still hope what I said may be helpful, if his jvm-focused question doesn't get you to a solution.
Just sharing that context, because this forum will in time show only the date of our posts, not the number of minutes or hours ago it shows on the day we post a reply.
Copy link to clipboard
Copied
Stefan, I'll say first that this is not some common problem. In fact, I find only one other case of it, and that from several months ago.
The workaround that worked for them (it seems) is "simple" but has ramifications to be considered. So I'm afraid this is going to be a longer reply than some may prefer.
1) Indeed, because of the nature of the workaround, before I offer it (and for your sake as well as future readers) I have couple of questions/suggestions.
2) So here's the other forum thread where a similar issue arose for a couple of folks, getting that "Could not initialize class java.awt.Font" error, which they too said was preceded by a Windows Update. There's a lot of back and forth between them and us to get to what one of them says ultimately solved things for them: to reinstall the Visual C++ redistributable package.
As you may know, that is implemented by the cf installer on Windows. That's always been a bit of a black box for us as cf users, where there's little info on how it's used by cf, what else may use it, what might be the implications of reinstalling it. Indeed, another question is often, "which version" is right for a given cf version?
If you were on cf2021, I could point out how at least an Adobe blog post on cf2021 offered a link to the 2012 version it used, which they refer to their also as the "vc runtime" (same thing). The focus of the post is how starting with CF2021, if one implements cf using the new "zip" approach, that specifically does NOT implement the visual c++ redistributable, and thus this offer of a link to get it.
But you don't mention your cf version. You could still be on cf11 or 2016 or 2018 (all of which are no longer supported/updated by Adobe). They each used different, older versions of the visual c++ redistributable, again not really documented well anywhere. And if you're on cf2023, I do think it uses the 2015 redistributable.
Here's why I say that: I happened to install CF2021 on a machine just yesterday, where I previously had CF2023 only. And I can see that the CF 2021 installer implemented the 2012 redistributable. This can be viewed in the Windows "add or remove programs" feature, which shows the date installed. More to the point, I can see I already had the 2015 one, which I'll assume was what CF2023 used.
And one more related thing: I can see that the CF 2021 installer implemented BOTH the 32-bit (x86) and 64-bit (x64) versions of the 2012 redistributable. While it's true that since CF2018, only 64-bit versions of CF itself are offered, I'll just say that if you do download and run only the x64 version of the VC runtime and things "aren't fixed", maybe try the x86 one as well.
Phew. I know that's a lot. Again, I am writing as much for posterity/for the sake of future readers who may find this, So do let us know both what cf version you're on, and whethr you try this, then let us know if it works. 🙂
Someone else (including Adobe) may well offer a different solution. Again, if this isn't prod then you may want to wait a day or two, if this all sounds a bit too fiddly. (And as always, I can help anyone with such things directly via remote screenshare consulting--and sometimes I might see clues to suggest other things, too numerous to anticipate here.)
Copy link to clipboard
Copied
Hi Charlie, thank you for your inputs. And of course, sorry, i forgot to put the must have informations like version of windows and coldfusion into my post.
To give you more input - we are using two different Windows Server 2016 with ColdFusion 2021 Update 3.
I've tried to upgrade the TEST system to ColdFusion Update 14 - but that didn't solved the issue.
I will test the methods regarding Visual C++ redistributable package and provide an update afterwards
Copy link to clipboard
Copied
The perils of integration: a Windows update resulting in a Java error.
Does the following help as a workaround?
-DOrg.apache.poi.ss.ignoreMissingFontSystem=true
to the java.args property in /bin/jvm.config.
For information on this setting, see https://poi.apache.org/components/configuration.html (scroll to bottom of page).
Copy link to clipboard
Copied
Hello Charlie,
thank you very much! The issue was coming from the missing missing C++ redistributable from 2015. After i installed it, restarted the Windows Server the error does not appear anymore.
Regards
Stefan
Copy link to clipboard
Copied
Thanks for the update, and very glad to have helped. And for the sake of future readers who may find this, what cf version were you running? And did you install the 32-bit or 64-bit vc++, or both?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more