CF21 - java.lang.ClassNotFoundException: net.sf.jasperreports.engine.xml.JasperDesignFactory
Copy link to clipboard
Copied
Hi all -
I have a clustered environment of three CF Enterprise servers (bare metal) each running four clustered instances. After much testing, we recently put these into production and are experiencing frequent errors. This seemingly causes the instance to hang, and requires manually stopping the instance, waiting a few moments and then restarting. This is happening at random to all instances, across all three bare metal servers, multiple times a day. It's a full time job identifying the failed server and CF instance, and then restarting it. Does anyone have any suggestions on how to diagnose the issue?
From the coldfusion-error log on a failed instance, we see:
Jul 19, 2021 6:27:59 PM org.apache.commons.digester3.Digester startElement SEVERE: Begin event threw exception java.lang.ClassNotFoundException: net.sf.jasperreports.engine.xml.JasperDesignFactory at coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:303) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at org.apache.commons.digester3.FactoryCreateRule.getFactory(FactoryCreateRule.java:379) at org.apache.commons.digester3.FactoryCreateRule.begin(FactoryCreateRule.java:276) at org.apache.commons.digester3.Digester.startElement(Digester.java:1350) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.commons.digester3.Digester.parse(Digester.java:1642) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:240) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:227) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:215) at coldfusion.runtime.report.Report.compileXml(Report.java:827) at coldfusion.runtime.report.Report.access$200(Report.java:90) at coldfusion.runtime.report.Report$3.fetch(Report.java:860) at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:153) at coldfusion.util.SoftCache.get(SoftCache.java:92) at coldfusion.runtime.report.Report._compileReport(Report.java:276) at coldfusion.runtime.report.Report.compileReport(Report.java:176) at coldfusion.runtime.report.Report.runReport(Report.java:425) at coldfusion.tagext.report.ReportTag.doEndTag(ReportTag.java:626) at cfvoucher2ecfm302681485._factor4(/var/www/html/services/vouchers/voucher.cfm:602) at cfvoucher2ecfm302681485._factor28(/var/www/html/services/vouchers/voucher.cfm:599) at cfvoucher2ecfm302681485._factor34(/var/www/html/services/vouchers/voucher.cfm:46) at cfvoucher2ecfm302681485.runPage(/var/www/html/services/vouchers/voucher.cfm:1) 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.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:572) 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.ExceptionFilter.invoke(ExceptionFilter.java:97) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:81) 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.CfmServlet.service(CfmServlet.java:231) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 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:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:182) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:330) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:459) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834) Jul 19, 2021 6:27:59 PM org.apache.commons.digester3.Digester parse SEVERE: An error occurred while parsing XML from '(already loaded from stream)', see nested exceptions org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 236; Error at line 4 char 236: net.sf.jasperreports.engine.xml.JasperDesignFactory at org.apache.commons.digester3.Digester.createSAXException(Digester.java:3118) at org.apache.commons.digester3.Digester.createSAXException(Digester.java:3146) at org.apache.commons.digester3.Digester.startElement(Digester.java:1355) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.commons.digester3.Digester.parse(Digester.java:1642) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:240) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:227) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:215) at coldfusion.runtime.report.Report.compileXml(Report.java:827) at coldfusion.runtime.report.Report.access$200(Report.java:90) at coldfusion.runtime.report.Report$3.fetch(Report.java:860) at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:153) at coldfusion.util.SoftCache.get(SoftCache.java:92) at coldfusion.runtime.report.Report._compileReport(Report.java:276) at coldfusion.runtime.report.Report.compileReport(Report.java:176) at coldfusion.runtime.report.Report.runReport(Report.java:425) at coldfusion.tagext.report.ReportTag.doEndTag(ReportTag.java:626) at cfvoucher2ecfm302681485._factor4(/var/www/html/services/vouchers/voucher.cfm:602) at cfvoucher2ecfm302681485._factor28(/var/www/html/services/vouchers/voucher.cfm:599) at cfvoucher2ecfm302681485._factor34(/var/www/html/services/vouchers/voucher.cfm:46) at cfvoucher2ecfm302681485.runPage(/var/www/html/services/vouchers/voucher.cfm:1) 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.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:572) 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.ExceptionFilter.invoke(ExceptionFilter.java:97) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:81) 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.CfmServlet.service(CfmServlet.java:231) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 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:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:182) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:330) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:459) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.engine.xml.JasperDesignFactory at coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:303) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at org.apache.commons.digester3.FactoryCreateRule.getFactory(FactoryCreateRule.java:379) at org.apache.commons.digester3.FactoryCreateRule.begin(FactoryCreateRule.java:276) at org.apache.commons.digester3.Digester.startElement(Digester.java:1350) ... 74 more
Thanks for any suggestions,
-Tony
Copy link to clipboard
Copied
It's apparently not an error in ColdFusion. There is a problem with your JasperReports library. The error-message is clear enough:
"An error occurred while parsing XML from '(already loaded from stream)', see nested exceptions org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 236; Error at line 4 char 236: net.sf.jasperreports.engine.xml.JasperDesignFactory".
You could post the stacktrace in the Jasper community: https://community.jaspersoft.com/
Copy link to clipboard
Copied
I dont think its quite as straight forward as you believe.
This is the default JasperReports library that ships with coldfusion. It is not an external JAR. More accurately, I believe the jar was included with one of the hotfixes.
And even more frustrating is that this works for a while, right up until it doesnt. We can call the same CFR code with the same data dozens or hundreds of times and it works. Then all of a sudden it stops working, and throws that error. Restarting the single failed instance fixes matters until it fails again.
Copy link to clipboard
Copied
I dont think its quite as straight forward as you believe.
This is the default JasperReports library that ships with coldfusion. It is not an external JAR. More accurately, I believe the jar was included with one of the hotfixes.
By GuitsBoy
Oh, I see. Then I take everything back that I said.
I shall have another look at the problem. Do you use any specific settings or configuration for the JasperReports?
Copy link to clipboard
Copied
Thank you for taking a look.
No, there was no configuration or changes for Jasper. In fact, we never even heard of jasper reports before this error. Its a simple CFReport page that creates a barcode shipping label.
The only modification we made for CF Reports at all was creating a directory, and then creating a symlink (RHEL8) since it seems CFReports were not correctly finding fonts even though they were registered in the CF admin. We found that iText on the back end was looking for fonts in /usr/share/fonts/default/TrueType and if we included the fonts there, or created this symlink, the barcode font was found, and label printed correctly. We opened a but on the matter, but they just closed it without bothering to look.
mkdir /usr/share/fonts/default
ln -s /usr/share/fonts/ttf /usr/share/fonts/default/TrueType
But otherwise that's it.
Oddly enough, we have only seen a few instances of this hangup today. Yesterday was dozens and dozens of occurances. It may be load dependant, and I dont know if yesterday was substantially higher load than today.
The dev team is trying to find any patterns which are associated with thehung CF instances.
Thanks again,
-Tony
Copy link to clipboard
Copied
Tony, I have a potential solution, an explanation, the steps to take, and an offer of more help if it's not that.
1) With a classnotfound exception like that, arising unexpectedly--and especially when you feel you do nothing with the said java object in your code, my first guess would be that this is an impact of a) having the "save class files" enabled on the cf admin caching page (a good thing, set on by default) and b) then doing either of two things: a cf update (as you've indicated, though these rarely cause this problem) or a change of Java from one major version to another.
And in either case, a simple solution is to clear the cfclasses folder for the cf instance, in its wwwroot/WEB-INF/cfclasses (NOT the sibling classes).
2) This is needed in such cases because the cfml for a given template was compiled in the past using a given Java version (which now fails) , and if it were recompiled with the new Java it would work. Again, this can also happen (though rarely with some cf updates, like the Elvis operator problem that hit many with the march cf updates).
And as for the fact that it sometimes happens and sometimes does not, it could withe be due to really being different templates (indicated in the error), or due to the flow of control in the template only sometimes hitting the line of cfml code that has this problem (or perhaps with different values for the attributes of a cf tag or args to a cf function at that line of code).
3) So Tony, can you first confirm if an instance in question has "save class files" enabled? If so, turning it off is NOT the answer. You'd stop each instance, clear that cfclasses folder (or rename it, and cf will create it anew on restart).
Yes, it means that after CF restarts, each template requested will be compiled, but that cost is generally negligible--paid only one time since the option to save the class files is enabled. (That's one more reason that turning it off is NOT the answer. The other is that if there are classes in cfclasses, cf may load those regardless of that setting.)
Try this on even one instance if you may prefer, to see if that instance alone no longer exhibits the problem.
Let us know how it goes. If it doesn't solve things, there can be any number of other things that are NOT necessarily a bug. (That said, I'd think it a mistake/wrong for your bug to be closed without any explanation, and I'd press for that regardless, if I were you.)
4) Finally, as to what it may be, if it's not this and not a bug, I will say I suspect I could help you assess and perhaps find an explanation, in less than an hour, in a remote scteenshare consulting session. I help people that way daily, and have often solved even such knotty inexplicable problems. If you don't find the time to be valuable, you'd not pay for it. More at the consulting page at carehart.org. Just offering that as a last resort.
Hope the other info above may get you going.
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
Hi Charlie, Thank you for the extremely helpful response!
In looking at our instances, "save class files" is currently DISABLED. While this may preclude your proposed fix, it does lead us down another path. Is it possible that two nearly simultaneous requests could potentially result in the second request looking for the compiled class from the first request, which has presumably been deleted? I know the CF admin says class files are saved between server restarts, so I dont know if that means they are recompiled between requests or at specific times.
I am not sure why we have this setting disabled. There may have been a very specific need for it on our CF10 instance we were using prior to the CF2021 cutover. I have checked with our dev team if there is a requirement to have this disabled, and if not, we will enable it on all instances.
As for the bug that was closed (Unrelated issue), it is here:
https://tracker.adobe.com/#/view/CF-4211391
I did update the bug ticket after they closed it, and attached the requested information, but it was never picked back up. Seems at least some other people are experiencing similar issues in this thread: https://community.adobe.com/t5/coldfusion/cfreport-pdf-unable-to-find-registered-ttf-font-yet-cfimag...
Thank you again for you help and suggestions,
-Tony
Copy link to clipboard
Copied
I have updated your bug ticket, requesting Adobe to reopen it.
Copy link to clipboard
Copied
Thank you for that. It's much appreciated.
Copy link to clipboard
Copied
Hi @GuitsBoy ,
From what I now understand, this is an error in JasperReports. Plus, JasperReports is the underlying engine ColdFusion uses to implement cfreport.
However, I do believe my initial instincts were correct. I originally said:
It's apparently not an error in ColdFusion. There is a problem with your JasperReports library.
That remains correct, but with a qualification. It is a classloader bug in ColdFusion. When ColdFusion starts, it fails to find the JasperReports class file in its classpath.
java.lang.ClassNotFoundException: net.sf.jasperreports.engine.xml.JasperDesignFactory at coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:303)
A test for you to do (Back up your files. Beware of the danger of testing on a production server😞
- Download jasperreports-6.17.0.jar from https://community.jaspersoft.com/project/jasperreports-library/releases ;
- Copy the Jar file to the lib directory of your ColdFusion instance;
- Restart the instance.
- Does the error persist?
Copy link to clipboard
Copied
There's a test I should have done even before the above test. That is, before importing the jasperreports Jar.
The following test will verify whether or not the class net.sf.jasperreports.engine.xml.JasperDesignFactory is on ColdFusion's classpath in the first place:
<cfset jrDesignFactory=createobject("java","net.sf.jasperreports.engine.xml.JasperDesignFactory")>
<cfdump var="#jrDesignFactory#" >
If so, then the error suggests that ColdFusion sometimes fails to load the JasperReports library during start-up.
Copy link to clipboard
Copied
Further ideas:
With new insight I would advise you to ignore the test with jasperreports-6.17.0.jar. There is a more appropriate Jar file to use. Namely the one currently in ColdFusion.
You're on ColdFusion 2021, which consists of separate packages that work in modular fashion. The Jar files for these packages are found in {CFROOT}/bundles. One such package is for reports: report-2021.0.01.325996.jar (your version number may be different). That Jar contains the class net.sf.jasperreports.engine.xml.JasperDesignFactory. So, it is the more appropriate Jar to use in the test.
There is something else you can do, which may in fact solve the problem: reinstall the report package.
Do it as follows:
- Open the ColdFusion Administrator of the instance.
- Go to the Package Manager page.
- Click to open Installed Packages. Is there a report package? If so, click on it and uninstall it.
- Click to open Available Packages. Click on the report package and install it.
- Restart the ColdFusion instance.
Copy link to clipboard
Copied
Thank you for your responses, BKBK.
While I am not 100% posive, I believe the issue has been largely aleviated by enabling the "save class files" which was off on our production systems for some reason. Unfortunately the process that seems to cause the issue is sporadic, and difficult to antcipate times of high load, so we may not know for certain if this has completely fixed the problem. If it returns, I will attempt to reinstall the package as suggested.
Thank you,
-Tony
Copy link to clipboard
Copied
The "Save class files" setting is just for classloading efficiency. It does not determine whether or not a class will be on the classpath. In any case, switching "Save class files" on or off shouldn't result in an exception.
Yet other considerations:
1) When the ColdFusion instance restarts, do you see a line similar to the following in the server.log?
"Information","main","07/25/21","11:24:29","","Package report started..."
And a line similar to the following in cfpm-audit.log?
"Information","main","07/18/21","18:53:20","","Installing the package : C:/ColdFusion2021/bundles/report-2021.0.01.325996.jar"
2) Are there any XML files involved with the reports processed in
/var/www/html/services/vouchers/voucher.cfm?
If there are, then they may offer a clue. Apparently, ColdFusion encounters an XML formatting error when processing an XML properties-file during start-up.
3) Go to the Security page in the ColdFusion Administrator. Is Sandbox Security enabled? If so, is reporting in the sandbox?
Copy link to clipboard
Copied
Thanks again for your help, BKBK.
1. Yes, we see both those lines in the server.log and cfpm-audit.log files. I am not sure if they are present for each and every server restart, but quite possibly.
2. I do not believe we are using any XML here, but I would need to check with the dev team to be certain.
3. We are not using sandbox security.
Thanks again,
-Tony
Copy link to clipboard
Copied
And are things still resolved for now by enabling the "save class files" feature? If so, that's indeed an interesting clue as to what may have been amiss, but I realize you may be happy to leave things be and move on.
If it comes back, I will say that the stack trace (shared initially) suggests that perhaps the cfreport process actually CREATES the xml and then that is processed via jasper. Nothing about that has ever been documented (or even discussed) that I've ever seen.
And as BKBK notes, it seems when jasper is READING that xml file that it gets the error. So back to my first point, about possible class file mismatch issues, I will note also that besides the cfclasses there are still other folders where cf saves compiled class files (which may NOT be affected by the "save class files" feature). Such classes are saved as related to running certain specific cf features, like cf-stubs where classes are saved related to outbound web service calls from cf, or cfc-skeletons for incoming cfc calls (I'm typing on my phone, so may have spelling or special chars there wrong). These are found in the instance root, rather than in wwwroot/WEB-INF.
My point is that there may well be a folder where classes are created and saved for cfreport processing. I've not run one in 10-20 years myself so I don't know. But we should be able to find if there is one, by creating and/or modifying a cfreport, and watching for what files get created /updated anywhere in the cf folder.
Just leaving those as clues /bread crumbs for any who may want to follow that trail.
Looking forward to seeing the conclusion for you.
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
So far so good, though we have to wait until we have a period of high volume hitting this particular CFReport.
I will keep all these suggestions in mind, and should the issue continue, will investigate both yours, as well as BKBK's suggestions, looking for any more clues or additional information/patterns.
Thank you again,
-Tony
Copy link to clipboard
Copied
I had the same issue and contacted Adobe. They asked me to uninstall the package called 'Presentation' and it fixed the issue. I reinstalled the package again and the issue still remained fixed so the solution seems to be to uninstall/reinstall the package 'Presentation'.
Copy link to clipboard
Copied
Also Adobe said they were aware of the issue and will be fixing it in a future update (currently not fixed in latest Update 2).
Copy link to clipboard
Copied
Thanks for the information.
Copy link to clipboard
Copied
Yes, very nice. Thanks for persisting to get an answer, and especially for sharing it here.
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
So just wanted to add that i just experienced this in my dev environment(we have noone in prodcution on cf2021 yet) and unistalling the package does indeed allow my cfr reports to generate again, however, if i reinstall the package it breaks again. Im currently on update 2 and on a windows. Havent looked into how harmful it might be to us to leave this "presentation" package uninstalled but will be looking into that. Thanks
Copy link to clipboard
Copied
Please check this thread and send an email to us. We will provide fix to you.
Priyank Shrivastava

