Cfdocument throws exception after a few days

After a few days of Lucee running on a production server, <cfdocument> throws the following exception:

Stacktrace
lucee.runtime.exp.NativeException: Provider for class javax.xml.transform.TransformerFactory cannot be created
  at java.xml/javax.xml.transform.FactoryFinder.findServiceProvider(FactoryFinder.java:293)
  at java.xml/javax.xml.transform.FactoryFinder.find(FactoryFinder.java:247)
  at java.xml/javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:126)
  at org.lucee.extension.pdf.util.XMLUtil.parseHTML(XMLUtil.java:77)
  at org.lucee.extension.pdf.xhtmlrenderer.FSPDFDocument.parseHTML(FSPDFDocument.java:244)
  at org.lucee.extension.pdf.xhtmlrenderer.FSPDFDocument.content(FSPDFDocument.java:114)
  at org.lucee.extension.pdf.xhtmlrenderer.FSPDFDocument._render(FSPDFDocument.java:96)
  at org.lucee.extension.pdf.PDFDocument.render(PDFDocument.java:360)
  at org.lucee.extension.pdf.tag.Document.renderInital(Document.java:822)
  at org.lucee.extension.pdf.tag.Document._doAfterBody(Document.java:716)
  at org.lucee.extension.pdf.tag.Document.doAfterBody(Document.java:673)
  at pages.backoffice.vendor.prescription_order_document_cfm$cf.call(/generate_document.cfm:245)
  at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:945)
  at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:837)
  at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:216)
  at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:42)
  at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2416)
  at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2406)
  at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2381)
  at lucee.runtime.engine.Request.exe(Request.java:43)
  at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1170)
  at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1116)
  at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
  at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
  at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1417)
  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:761)
  at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1675)
  at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
  at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
  at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
  at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:207)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:515)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:603)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:228)
  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1576)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:226)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1358)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:181)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:472)
  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:179)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1282)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:134)
  at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:210)
  at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:134)
  at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
  at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
  at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
  at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
  at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:215)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1650)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:515)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:585)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:228)
  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1576)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:226)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1358)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:181)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:472)
  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:179)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1282)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:134)
  at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:197)
  at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:56)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:567)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:404)
  at org.eclipse.jetty.server.HttpChannel$$Lambda$293/0x0000000000000000.dispatch(Unknown Source)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:661)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:396)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:289)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:324)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:106)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:790)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:912)
  at java.base/java.lang.Thread.run(Thread.java:836)
Caused by: javax.xml.transform.TransformerFactoryConfigurationError: Provider for class javax.xml.transform.TransformerFactory cannot be created
  ... 91 more
Caused by: java.lang.RuntimeException: Provider for class javax.xml.transform.TransformerFactory cannot be created
  at java.xml/javax.xml.transform.FactoryFinder.findServiceProvider(FactoryFinder.java:290)
  ... 90 more
Caused by: java.util.ServiceConfigurationError: javax.xml.transform.TransformerFactory: Error accessing configuration file
  at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582)
  at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1173)
  at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1206)
  at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1221)
  at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
  at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
  at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
  at java.xml/javax.xml.transform.FactoryFinder$1.run(FactoryFinder.java:275)
  at java.base/java.security.AccessController.doPrivileged(AccessController.java:682)
  at java.xml/javax.xml.transform.FactoryFinder.findServiceProvider(FactoryFinder.java:271)
  ... 90 more
Caused by: java.io.FileNotFoundException: C:\Users\lucee\AppData\Local\Temp\2\com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl (Das System kann die angegebene Datei nicht finden)
  at java.base/java.io.FileInputStream.open0(Native Method)
  at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
  at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
  at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
  at java.base/sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:86)
  at java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:184)
  at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1165)
  ... 98 more

Restarting Lucee (via server admin) fixes the issue. But that only helps for a few days and the same exception is thrown again. Once the exception occurs, all <cfdocument> calls are affected and immediately throw the exception.

OS: Windows Server 2019
Java Version: OpenJDK 11.0.10
Jetty Version: 10.0
Lucee Version: 5.3.7.47
PDF Extension Version: 1.0.0.80, 1.0.0.94 (I’m currently testing 1.0.0.96-SNAPSHOT)

Windows CF servers are not as stable as their NIX counterparts. Doesn’t matter which version of CF you are running, they simply are not as stable.

Run a script to reboot your Windows servers on a daily basis or run the same script on a production ready NIX host.

That’s a terrible response and not helpful at all. This is not about what operating system is better or worse.

The stacktrace indicates an issue with the way the dependency configuration is loaded (java.util.ServiceConfigurationError). Either something is deregistered during runtime or there is a package conflict of some sorts. It is way more likely that Jetty or Lucee are doing something OSGi related wrong here over the OS being Windows.

1 Like

that’s an interesting bug.

are you using any third party java libs, maybe which only get called/loaded occasionally?

I am not knocking your problem, but I have 600+ boxes of which 120+ Windows problem children all of which if left to run even simple code such as HELLO WORLD from a script, eventually chew up all the available memory and crash. The only, and I leave this as a caveat as it crashes on a ton of other items is IBM WebSphere, which is rock solid as hell if not costly to implement versus a CENTOS or RHEL.

So please though, when you tear through either tomcat or windows and figure out the exact issue why after X days windows Tomcat JSP / CF pages start to error out, would love to hear it as so far Microsoft, IBM, HP, Dell, not to mention a plethora of contractors can’t give an answer why the same code on the same hardware running Windows crashes within 18+ hours where on NIX the uptime is until we restart it.

This We have tried
New hardware, different hardware
More more memory, faster disks, faster processors, more processors
Every server version of windows
Virtual / non-virtual implementations
compiling tomcat
ACF / LUCEE
software / code fixes
Tomcat / IBM Websphere

There are a dozen other things that have been tried including rewriting parts of the work flow in various other languages to compensate, but the end of the day is:

Windows Servers need restarted running heavy java loads
NIX servers do not

still OT and not relevant to the @akwas’s current problem, which is java related and I’ll happily bet you a beer it’s not OS related

It’s a separate JVM instance that runs only a single application. No external libraries/JARs (other than tuckey’s UrlRewriteFilter through Jetty), only official Lucee extensions. Edit: Actually we are having some custom JARs in the classloader path. I’ll remove them and test again.

Bundle
Bundle Version Created Size Vendor Used by State
ASM all classes (org.objectweb.asm.all) 4.2.0 12.10.2013 211kb France Telecom R&D Lucee active
Adobe XMP Core (xmpcore) 5.1.2.0002L 116kb Copyright 2006-2009 Adobe Systems Incorporated. All rights reserved Lucee active
Apache Commons Codec (org.apache.commons.codec)
The Apache Commons Codec package contains simple encoder and decoders for various formats such as Base64 and Hexadecimal. In addition to these widely used encoders and decoders, the codec package also maintains a collection of phonetic encoding utilities. 1.9.0 21.12.2013 258kb The Apache Software Foundation Lucee active
Apache Commons Collections (org.apache.commons.collections4)
The Apache Commons Collections package contains types that extend and augment the Java Collections Framework. 4.0.0 20.11.2013 596kb The Apache Software Foundation Lucee active
Apache FontBox (org.apache.pdfbox.fontbox)
The Apache FontBox library is an open source Java tool to obtain low level information from font files. FontBox is a subproject of Apache PDFBox. 1.8.13 05.12.2016 215kb The Apache Software Foundation PDF Extension active
Apache JempBox (org.apache.pdfbox.jempbox)
The Apache JempBox library is an open source Java tool that implements Adobe’s XMP™ specification. JempBox is a subproject of Apache PDFBox. 1.8.13 05.12.2016 50.5kb The Apache Software Foundation PDF Extension active
Apache Log4j (log4j)
Apache Log4j 1.2 1.2.17 06.05.2012 478kb Apache Software Foundation Lucee active
Apache PDFBox application (org.apache.pdfbox.app)
The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users. 2.0.21 17.08.2020 9.4mb The Apache Software Foundation active
Apache Tika core (org.apache.tika.core)
This is the core Apache Tika™ toolkit library from which all other modules inherit functionality. It also includes the core facades for the Tika API. 1.22.0 29.07.2019 688kb The Apache Software Foundation Lucee active
Commons Discovery (org.apache.commons.discovery)
The Apache Commons Discovery component is about discovering, or finding, implementations for pluggable interfaces. 0.5.0 27.04.2011 77.9kb The Apache Software Foundation not loaded
Commons Imaging (org.apache.commons.image)
Commons Imaging (previously Sanselan) is a pure-Java image library. 1.0.0.R1534292 26.03.2014 699kb The Apache Software Foundation Image extension not loaded
Commons Net (org.apache.commons.net)
Apache Commons Net library contains a collection of network utilities and protocol implementations.Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Telnet, Whois 3.3.0 08.06.2013 274kb The Apache Software Foundation Lucee active
Flying Saucer Core Renderer (org.xhtmlrenderer.flying.saucer.core)
Flying Saucer is a CSS 2.1 renderer written in Java. This artifact contains the core rendering and layout code as well as Java2D output. 9.1.20 10.01.2020 1.19mb PDF Extension active
Lucee Core (lucee.core) 5.3.7.47 29.10.2020 9.4mb Lucee active
MySQL Connector Java (com.mysql.jdbc) 5.1.44 976kb Oracle Corporation active
MySQL Connector/J (com.mysql.cj) 8.0.19 2.25mb Oracle Corporation MySQL active
StAX 1.0 API (stax.api) 1.0.1.0002L 26.1kb JCP Lucee active
Standard runtime (hsqldb) 1.8.0 634kb ft Lucee active
System Bundle (org.apache.felix.framework)
This bundle is system specific; it implements various system services. 6.0.2 active
admin (4ntr33yhotqo)
this is a regular mapping generated by Lucee. 1.0.0.q9y1ce511rsf 1.24mb resolved
amazon.pay.api.2.2.2 0.0.0.0 2.8mb active
backport-util-concurrent (backport.util.concurrent) 2.2.0 323kb Lucee active
bouncycastle.mail 1.38.0 183kb BouncyCastle_org PDF Extension active
bouncycastle.prov 1.38.0 1.44mb BouncyCastle_org PDF Extension active
bouncycastle.tsp 1.38.0 22.2kb BouncyCastle_org PDF Extension active
cfspreadsheet (1mz0ez85r04pz)
this is a cfc mapping generated by Lucee. 1.0.0.1q4cgun7t1cgi 74.8kb resolved
cfspreadsheet 3.0.1 15.3mb Leftbower cfspreadsheet not loaded
com.sun.media.jai.codec (sun.jai.codec) 1.1.2.0003L 321kb Sun Microsystems, Inc. Image extension not loaded
context (wocxy5u3jzpp)
this is a regular mapping generated by Lucee. 1.0.0.18ucyjig8y004 867kb resolved
esapi.extension 2.1.0.18 24.03.2020 23.9kb ESAPI extension active
fnv1 0.0.0.0 3.16kb active
fusiondebug-api-server (fusiondebug.api.server) 1.0.20 7.26kb Lucee active
icepdf-core (icepdf.core) 3.1.0.3 409kb PDF Extension active
jacob 1.16.1 47.3kb Lucee active
javasysmon 0.3.3 82.8kb Lucee active
javax.mail.activation 1.6.2.0000L 712kb Lucee active
javax.mail.activation 1.4.7.0002L 566kb not loaded
javax.media.jai (sun.jai.core) 1.2.1.0003L 1.81mb Sun Microsystems, Inc. Image extension not loaded
jcifs 1.3.17 387kb Lucee active
jencrypt 1.4.2.04 38.5kb Lucee active
json.io.3.0.1 0.0.0.0 96.3kb active
libphonenumber (com.googlecode.libphonenumber)
Google’s common Java library for parsing, formatting, storing and validating international phone numbers. Optimized for running on smartphones. 8.12.6 18.06.2020 341kb Google active
lucee.image.extension 1.0.0.35 23.03.2020 2.04mb not loaded
lucee.image.extension 1.0.0.38 22.01.2021 2.04mb Image extension not loaded
metadata-extractor (metadata.extractor) 2.8.1.0002L 341kb Drew Noakes Image extension not loaded
org.apache.oro 2.0.8 64kb Lucee active
org.lucee.axis
OSGI version of jar Axis 1.4.0.L0002 30.11.2017 1.54mb not loaded
org.lucee.axis.ant
OSGI version of jar Axis ANT 1.4.0.L0002 30.11.2017 34.4kb not loaded
org.lucee.axis.extension 1.4.0.25-SNAPSHOT 01.04.2019 103kb not loaded
org.lucee.commons.compress
OSGI version of jar Apache Commons Compress 1.9.0 27.02.2016 367kb Lucee active
org.lucee.commons.email
OSGI version of jar Apache Commons Email 1.2.0 27.02.2016 25.9kb Lucee active
org.lucee.commons.fileupload
OSGI version of jar Apache Commons FileUpload 1.3.2.L0001 25.07.2016 62.9kb Lucee active
org.lucee.commons.httpclient
OSGI version of jar Apache Commons HTTPClient 3.1.0 27.02.2016 299kb not loaded
org.lucee.commons.io
OSGI version of jar Apache Commons IO 2.4.0 27.02.2016 177kb Lucee active
org.lucee.commons.lang
OSGI version of jar Apache Commons Lang 2.6.0 27.02.2016 274kb Lucee active
org.lucee.commons.logging
OSGI version of jar Apache Commons Logging 1.1.1.L0001 19.05.2016 53.3kb Lucee active
org.lucee.commons.logging.adapters
OSGI version of jar Apache Commons Logging Adapters 1.1.0 07.03.2016 19.2kb Lucee active
org.lucee.commons.logging.api
OSGI version of jar Commons Logging API 1.1.0 27.02.2016 42.3kb Lucee active
org.lucee.commons.sanselan
OSGI version of jar Apache Commons Sanselan 0.97.0.incubator 27.02.2016 487kb Image extension not loaded
org.lucee.esapi
OSGI version of jar ESAPI 2.1.0.1 07.03.2016 388kb ESAPI extension active
org.lucee.flyingSaucerPDF
OSGI version of jar flyingSaucerPDF 9.1.20 21.08.2020 115kb PDF Extension active
org.lucee.httpcomponents.httpclient
OSGI version of jar Apache HttpClient 4.5.10 16.09.2019 753kb Lucee active
org.lucee.httpcomponents.httpclient
OSGI version of jar Apache HttpClient 4.5.2 13.07.2016 723kb not loaded
org.lucee.httpcomponents.httpclient
OSGI version of jar Apache HttpClient 4.5.6 31.08.2018 746kb not loaded
org.lucee.httpcomponents.httpcore
OSGI version of jar Apache HttpCore 4.4.12 16.09.2019 317kb Lucee active
org.lucee.httpcomponents.httpcore
OSGI version of jar Apache HttpCore 4.4.4 13.07.2016 312kb not loaded
org.lucee.httpcomponents.httpcore
OSGI version of jar Apache HttpCore 4.4.10 31.08.2018 315kb not loaded
org.lucee.httpcomponents.httpmime
OSGI version of jar Apache HttpMime 4.5.10 19.09.2019 36.4kb Lucee active
org.lucee.httpcomponents.httpmime
OSGI version of jar Apache HttpMime 4.5.6 31.08.2018 36.4kb not loaded
org.lucee.imgscalr
OSGI version of jar imgscalr 4.2.0 21.02.2019 28.3kb Image extension not loaded
org.lucee.itext
OSGI version of jar itext 2.1.7 22.04.2017 1.09mb PDF Extension active
org.lucee.jaxrpc
OSGI version of jar JAXRPC 1.4.0 27.02.2016 34.1kb not loaded
org.lucee.jsch
OSGI version of jar jsch 0.1.53 22.04.2016 277kb Lucee active
org.lucee.jta
OSGI version of jar JTA 1.1.0 28.02.2016 12kb Lucee active
org.lucee.jzlib
OSGI version of jar jzlib 1.1.3 22.04.2016 71.6kb Lucee active
org.lucee.pdfbox
OSGI version of jar pdfbox 1.8.13 19.05.2017 3.9mb PDF Extension active
org.lucee.portlet
OSGI version of jar portlet 1.0.0 04.03.2016 19.1kb Lucee active
org.lucee.saaj
OSGI version of jar SAAJ 1.4.0 27.02.2016 21.5kb not loaded
org.lucee.wsdl4j
OSGI version of jar WSDL4J 1.5.1 27.02.2016 129kb not loaded
org.lucee.xml.apis
OSGI version of jar XML Apis 1.4.1 28.02.2016 224kb Lucee active
org.lucee.xml.resolver
OSGI version of jar Apache XML Commons Resolver Component 1.2.0 28.02.2016 85.3kb Lucee active
oswego-concurrent (org.lucee.oswego-concurrent)
OSGI version of jar Oswego Concurrent 1.3.4 26.10.2015 191kb Lucee active
pdf.extension 1.0.0.96-SNAPSHOT 03.05.2021 3.29mb PDF Extension active
slf4j-api (slf4j.api)
The slf4j API 1.7.12 31.4kb SLF4J_ORG Lucee active
slf4j-nop (slf4j.nop)
SLF4J NOP Binding 1.7.12 3.99kb SLF4J_ORG resolved
ss_css2 (ss.css2) 0.9.4 152kb Lucee active
sun-jndi-ldap (sun.jndi.ldap) 1.2.4 122kb Lucee active
sun-jndi-ldapbp (sun.jndi.ldapbp) 1.2.4 22.6kb Lucee active
sun-jndi-ldapsec (sun.jndi.ldapsec) 1.2.4 58.8kb Lucee active
sun-jndi-providerutil (sun.jndi.providerutil) 1.2.4 78.9kb Lucee active
sun-security-jaas (sun.security.jaas) 1.2.4 102kb Lucee active
tagsoup 1.2.1.0002L 89.1kb PDF Extension
Lucee active
w3c-dom (w3c.dom) 1.1.0 37.6kb Lucee active
zxing.core.3.2.1 0.0.0.0 533kb active
zxing.javase.3.2.1 0.0.0.0 37.4kb active

We are running another JVM instance on the same machine that runs the same code (with a different configuration and a different domain). This one also uses <cfdocument>, but does not seem to have the issue.

Any ideas how to potentially cause/reproduce the problem? I was just running a loop of <cfdocument> with no problems so far.

I’m guessing it’s possibily an already solved problem,

some extensions bundle a copy of lucee.jar so we can reuse some functions, the PDF extension has a rather old 5.0.0.100-SNAPSHOT bundled with it, which maybe causing the problem

haha, i thought all this sounded way too familiar, just checked jira and viola!

https://luceeserver.atlassian.net/browse/LDEV-3108?focusedCommentId=46732

Your post reminds me of an issue I had a long, long time ago from the times I’ve been generating PDF with third party tools (CF didn’t have HTML to PDF converter then). Just sharing it here, just in case… At that time I found out, that some special ASCI characters of the dynamic generating content triggered an exception.

Any chance that this may be related to any dynamic content outputted in the cfdocument body, that may cause an unloading of the libary?

The only significant detail about the PDF in question is the use of localUrl="true" and having a bunch of <img src="..."> tags referencing these local files.

Here is the code (I removed plain content for simplicity):

<cfdocument
	format="PDF"
	localUrl="true"
	pageType="A4"
>
	<cfoutput>

		<style type="text/css">
			[...]
		</style>

		<img src="/static/images/foo.png" />

		<div>
			[...]
		</div>

		<cfloop array="#imageUrls#" index="imageUrl">

			<img src="#imageUrl#" />
			<div>
				[...]
			</div>

		</cfloop>

		<cfdocumentitem type="footer" evalAtPrint="true">

			<div>

				<cfif (CFDOCUMENT.CurrentPageNumber eq CFDOCUMENT.TotalPageCount)>
					[...]
				</cfif>

				<div>
					#CFDOCUMENT.CurrentPageNumber# / #CFDOCUMENT.TotalPageCount#
				</div>

			</div>

		</cfdocumentitem>

	</cfoutput>
</cfdocument>

<cfheader name="Content-Type" value="application/pdf">
<cfheader name="Content-Disposition" value="inline">

I would try to add

fontembed =“true”
fontdirectory =“pathToWebFontUsed” <!— C:\App\font\myfont.ttf

that way you are not replying upon the fontconfig.bfc in tomcat, which by default lists off everything in the OS, it will save a small amount of memory.

Update: Problem still occurs with 1.0.0.96-SNAPSHOT and not having any custom JARs loaded. So I hope LDEV-3108 will fix it.