[Archivesspace_Users_Group] Print to PDF background job fail
Zachary L Pelli
zachary.pelli at shu.edu
Fri Dec 16 14:53:20 EST 2022
Hey, we are seeing this error when attempting to export a PDF of a collection:
Generating PDF for UNA-USA Collection
Internal error evaluating template rule at line 123 in module file:/var/local/archivesspace/archivesspace/stylesheets/as-ead-pdf.xsl
net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(net/sf/saxon/expr/instruct/TemplateRule.java:371)
net.sf.saxon.trans.Mode.applyTemplates(net/sf/saxon/trans/Mode.java:533)
net.sf.saxon.trans.XsltController.applyTemplates(net/sf/saxon/trans/XsltController.java:746)
net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(net/sf/saxon/s9api/Xslt30Transformer.java:441)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:426)
org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:293)
org.jruby.RubyClass.finvokeWithRefinements(org/jruby/RubyClass.java:514)
org.jruby.RubyBasicObject.send(org/jruby/RubyBasicObject.java:1755)
org.jruby.RubyKernel.send(org/jruby/RubyKernel.java:2200)
org.jruby.RubyKernel$INVOKER$s$send.call(org/jruby/RubyKernel$INVOKER$s$send.gen)
RUBY.invocation_lambda(/var/local/archivesspace/archivesspace/gems/gems/saxon-rb-0.8.3-java/lib/saxon/xslt/executable.rb:270)
org.jruby.RubyProc.call(org/jruby/RubyProc.java:291)
org.jruby.RubyProc$INVOKER$i$call.call(org/jruby/RubyProc$INVOKER$i$call.gen)
RUBY.to_destination(/var/local/archivesspace/archivesspace/gems/gems/saxon-rb-0.8.3-java/lib/saxon/xslt/invocation.rb:73)
RUBY.to_fo(/var/local/archivesspace/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/lib/AS_fop.rb:44)
RUBY.to_pdf(/var/local/archivesspace/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/lib/AS_fop.rb:58)
RUBY.run(/var/local/archivesspace/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/lib/job_runners/print_to_pdf_runner.rb:50)
var.local.archivesspace.archivesspace.data.tmp.jetty_minus_0_dot_0_dot_0_dot_0_minus_8089_minus_backend_dot_war_minus___minus_any_minus_.webapp.WEB_minus_INF.app.lib.request_context.open(/var/local/archivesspace/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/lib/request_context.rb:24)
RUBY.run(/var/local/archivesspace/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/lib/job_runners/print_to_pdf_runner.rb:13)
var.local.archivesspace.archivesspace.data.tmp.jetty_minus_0_dot_0_dot_0_dot_0_minus_8089_minus_backend_dot_war_minus___minus_any_minus_.webapp.WEB_minus_INF.app.lib.background_job_queue.invokeOther31:run(var/local/archivesspace/archivesspace/data/tmp/jetty_minus_0_dot_0_dot_0_dot_0_minus_8089_minus_backend_dot_war_minus___minus_any_minus_/webapp/WEB_minus_INF/app/lib//var/local/archivesspace/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/lib/background_job_queue.rb:126)
var.local.archivesspace.archivesspace.data.tmp.jetty_minus_0_dot_0_dot_0_dot_0_minus_8089_minus_backend_dot_war_minus___minus_any_minus_.webapp.WEB_minus_INF.app.lib.background_job_queue.run_pending_job(/var/local/archivesspace/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/lib/background_job_queue.rb:126)
RUBY.start_background_thread(/var/local/archivesspace/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/lib/background_job_queue.rb:169)
org.jruby.RubyProc.call(org/jruby/RubyProc.java:318)
java.lang.Thread.run(java/lang/Thread.java:750)
And here is the section in the XSL file the error seems to be referring to:
<!-- Start main page design and layout -->
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-size="12pt" font-family="KurintoText,KurintoTextJP,KurintoTextKR,KurintoTextSC,NotoSerif">
<!-- Set up page types and page layouts -->
<fo:layout-master-set>
<!-- Page master for Cover Page -->
<fo:simple-page-master master-name="cover-page" page-width="8.5in" page-height="11in" margin="0.5in">
<fo:region-body margin="0.5in 0.5in 1in 0.5in"/>
<fo:region-before extent="0.2in"/>
<fo:region-after extent="2in"/>
</fo:simple-page-master>
<!-- Page master for Table of Contents -->
<fo:simple-page-master master-name="toc" page-width="8.5in" page-height="11in" margin="0.5in">
<fo:region-body margin-top="0.25in" margin-bottom="0.25in"/>
<fo:region-before extent="0.5in"/>
<fo:region-after extent="0.2in"/>
</fo:simple-page-master>
<!-- Page master for Finding Aid Contents -->
<fo:simple-page-master master-name="contents" page-width="8.5in" page-height="11in" margin="0.5in">
<fo:region-body margin-top="0.25in" margin-bottom="0.25in"/>
<fo:region-before extent="0.5in"/>
<fo:region-after extent="0.2in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<!-- Builds PDF bookmarks for all major sections -->
<xsl:apply-templates select="/ead:ead/ead:archdesc" mode="bookmarks"/>
<!-- The fo:page-sequence establishes headers, footers and the body of the page.-->
<!-- Cover page layout -->
<fo:page-sequence master-reference="cover-page">
<xsl:if test="/ead:ead/ead:eadheader/ead:filedesc/ead:publicationstmt">
<fo:static-content flow-name="xsl-region-after">
<xsl:apply-templates select="/ead:ead/ead:eadheader/ead:filedesc/ead:publicationstmt" mode="coverPage"/>
</fo:static-content>
</xsl:if>
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="/ead:ead/ead:eadheader/ead:filedesc/ead:titlestmt" mode="coverPage"/>
</fo:flow>
</fo:page-sequence>
<!-- Table of Contents layout -->
<fo:page-sequence master-reference="toc">
<!-- Page header -->
<fo:static-content flow-name="xsl-region-before" margin-top=".15in">
<fo:block color="dimgray" font-size="10pt" text-align="center">
<xsl:apply-templates select="ead:ead/ead:eadheader/ead:filedesc/ead:titlestmt" mode="pageHeader"/>
</fo:block>
</fo:static-content>
<!-- Page footer-->
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center" color="dimgray">
<xsl:text>- Page </xsl:text>
<fo:page-number/>
<xsl:text> -</xsl:text>
</fo:block>
</fo:static-content>
<!-- Content of page -->
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="/ead:ead/ead:archdesc" mode="toc"/>
</fo:flow>
</fo:page-sequence>
<!-- All the rest -->
<fo:page-sequence master-reference="contents">
<!-- Page header -->
<fo:static-content flow-name="xsl-region-before" margin-top=".15in">
<fo:block color="dimgray" font-size="10pt" text-align="center">
<xsl:apply-templates select="ead:ead/ead:eadheader/ead:filedesc/ead:titlestmt" mode="pageHeader"/>
</fo:block>
</fo:static-content>
<!-- Page footer-->
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center">
<xsl:text>- Page </xsl:text>
<fo:page-number/>
<xsl:text>- </xsl:text>
</fo:block>
</fo:static-content>
<!-- Content of page -->
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="/ead:ead/ead:archdesc"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
Unfortunately my XML/XSL knowledge is limited. I suspect that it may be related to the notes that Preservica adds which includes HTML code, but I'm not sure. Its one of the few things differentiating this collection from others which export successfully.
Regards,
Zach Pelli
Digital Collections Infrastructure Developer
Seton Hall University Libraries
973.275.2046
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20221216/7bf050d1/attachment.html>
More information about the Archivesspace_Users_Group
mailing list