Error on CFDocument: Provider for class javax.xml.transform.TransformerFactory cannot be created

Description

actually this problem was happen since lucee 5.3.5.92 I thought with upgrading to 5.3.7.43 will solve the problem but it seems the problem still exists. This error occur after the lucee run in some hours, when the lucee start all are fine. I can generate pdf without error, but after some hours, the generate pdf using cfdocument not work anymore, the lucee will throw error: "Provider for class javax.xml.transform.TransformerFactory cannot be created" but if I restart lucee, then cfdocument will work again. FYI, in lucee 5.3.4.80 this problem is never happen, so for now my lucee is stuck at 5.3.4.80 :(

below is the stack trace:
java.lang.RuntimeException: Provider for class javax.xml.transform.TransformerFactory cannot be created

Provider for class javax.xml.transform.TransformerFactory cannot be created
javax.xml.transform.FactoryFinder.findServiceProvider(Unknown Source)
javax.xml.transform.FactoryFinder.find(Unknown Source)
javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
org.lucee.extension.pdf.util.XMLUtil.parseHTML(XMLUtil.java:75)
org.lucee.extension.pdf.PDFDocument.toXML(PDFDocument.java:328)
org.lucee.extension.pdf.pd4ml.PD4MLPDFDocument.beautifyHTML(PD4MLPDFDocument.java:277)
org.lucee.extension.pdf.pd4ml.PD4MLPDFDocument.content(PD4MLPDFDocument.java:144)
org.lucee.extension.pdf.pd4ml.PD4MLPDFDocument.render(PD4MLPDFDocument.java:120)
org.lucee.extension.pdf.tag.Document.render(Document.java:727)
org.lucee.extension.pdf.tag.Document._doEndTag(Document.java:619)
org.lucee.extension.pdf.tag.Document.doEndTag(Document.java:574)
stats.emp.empabsence.print_cfpdf_cfm$cf.call(/app/print_cfpdf.cfm:220)
lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:945)
lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:837)
lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:216)
lucee.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:104)
lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2416)
lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2406)
lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2381)
lucee.runtime.engine.Request.exe(Request.java:43)
lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1170)
lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1116)
lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:47)
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:134)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:772)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:344)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:207)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:809)
com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:71)
sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:54)
com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:42)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java)
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Environment

docker-command box 5.0.1
pdf extention 1.0.0.68
lucee 5.3.7.43

Activity

Show:
Zac Spitzer
October 26, 2020, 2:18 AM

latest PDF extension is 1.0.0.80, not 1.0.0.68, can you test the latest version?

Andri Senjaya
October 26, 2020, 8:38 AM

yes, I have test with 1.0.0.80 too and the result are same, after some hours the error:

java.lang.RuntimeException: Provider for class javax.xml.transform.TransformerFactory cannot be created

and

java.io.FileNotFoundException: /tmp/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl (No such file or directory)

happen.

Zac Spitzer
October 26, 2020, 8:51 AM

I think it’s possibly coz the PDF extension also bundles Lucee.jar, and it’s old 5.0.0.100-SNAPSHOT:1446109962493 from 2015

https://github.com/lucee/extension-pdf/blob/master/source/java/src/org/lucee/extension/pdf/util/XMLUtil.java#L92

the Lucee xmlCaster has had quite a few bug fixes since then

https://github.com/lucee/Lucee/commits/5.3/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java

Andri Senjaya
October 28, 2020, 10:38 AM

I have test again with lucee 5.3.7.43 + pdf ext 1.0.0.94 and the problem still there. At the first time all is ok, pdf generation is fine, but after 10hrs, the error is come, and cfdocument is always error.

Andri Senjaya
October 28, 2020, 10:43 AM

I attached again the stacktrance I get from my FR

Assignee

Unassigned

Reporter

Andri Senjaya

Priority

Major

Labels

Fix versions

None

Affects versions

Configure