×

Loading...
Ad by
Ad by

请教一个FOP/pdf 的问题

fop 0.92beta.

程序大多数时候正常,但有时会出Exception, 1 of 20+... 见下面:

ERROR com.abc.gdp.tecp.eps.actions.PrintAllAction [-2087236473] - java.lang.IllegalArgumentException: The number of this PDFNumber must not be empty

SystemID: file:///usr/bea/home/beadtp4/config/dp4/tecp/config/conf/fop/fax-mail.xsl; Line#: 66; Column#: 93

javax.xml.transform.TransformerException: java.lang.IllegalArgumentException: The number of this PDFNumber must not be empty
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2344)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:710)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)



Xsl 出错那行:
<fo:page-sequence master-reference="Section1-ps" initial-page-number=“1”>

感觉是哪个Fop class is not thread safe....
还是itext 好。。。可老板不给用。。。
求救!
Report

Replies, comments and Discussions:

  • 工作学习 / 专业技术讨论 / 请教一个FOP/pdf 的问题
    fop 0.92beta.

    程序大多数时候正常,但有时会出Exception, 1 of 20+... 见下面:

    ERROR com.abc.gdp.tecp.eps.actions.PrintAllAction [-2087236473] - java.lang.IllegalArgumentException: The number of this PDFNumber must not be empty

    SystemID: file:///usr/bea/home/beadtp4/config/dp4/tecp/config/conf/fop/fax-mail.xsl; Line#: 66; Column#: 93

    javax.xml.transform.TransformerException: java.lang.IllegalArgumentException: The number of this PDFNumber must not be empty
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2344)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:710)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)



    Xsl 出错那行:
    <fo:page-sequence master-reference="Section1-ps" initial-page-number=“1”>

    感觉是哪个Fop class is not thread safe....
    还是itext 好。。。可老板不给用。。。
    求救!
    • only one cent
      As you got the excpetion is:

      java.lang.IllegalArgumentException: The number of this PDFNumber must not be empty.

      The definition in the Line#: 66; Column#: 93 of fax-mail.xsl, its value must be validated in your object which you will pass to FOP. As you defined it (Section1-ps) initial-page-number=“1”>.
      • Thanks for trying to help, but I tried before, doesn't work. The REAL question is why it just works SOMETIMES, quite seems a non-thread-safe problem.
        • Use try ... catch to catch the exception and write the object's status to log file. When you get exception, you can check log file for detail information.
          • well. it is hard to log status, since fop use Xalan, xmlapi... and exception thrown from xalan, but message is from fop.I think there must be something not thread-safe in fop.