[英]Barcode4j generate barcode error
I'm using Barcode4j and FOP to generate a PDF that contains a barcode. 我正在使用Barcode4j和FOP生成包含条形码的PDF。 It works perfect on my Eclipse local environment, but after deploying to weblogic and accessing the function via web I get the following error:
它在我的Eclipse本地环境上运行完美,但是在部署到weblogic并通过Web访问该函数后,出现以下错误:
ERROR: 'The first argument to the non-static Java function 'org.krysalis.barcode4j.xalan.BarcodeExt.generate(result-tree, result-tree)' is not a valid object reference.'
错误:“非静态Java函数'org.krysalis.barcode4j.xalan.BarcodeExt.generate(result-tree,result-tree)的第一个参数”不是有效的对象引用。 FATAL ERROR: 'Could not compile stylesheet'
严重错误:“无法编译样式表”
These are the sections of the stylesheet: 这些是样式表的各个部分:
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:barcode="org.krysalis.barcode4j.xalan.BarcodeExt"
extension-element-prefixes="barcode"
exclude-result-prefixes="fo">
barcode generation: 条码生成:
<fo:instream-foreign-object>
<xsl:variable name="barcodeNumber">
<xsl:value-of select="barcodeNumber" />
</xsl:variable>
<xsl:variable name="barcode-cfg">
<barcode>
<intl2of5>
<height>18mm</height>
<module-width>0.28mm</module-width>
<human-readable><placement>none</placement>
</human-readable>
</intl2of5>
</barcode>
</xsl:variable>
<xsl:copy-of select="barcode:generate($barcode-cfg, $barcodeNumber)" />
I'm using jdk 1.5.0_22, xalan-2.7.0, fop 1.1 我正在使用jdk 1.5.0_22,xalan-2.7.0,fop 1.1
Any help will be appreciated. 任何帮助将不胜感激。
If you define a namespace prefix for the barcode extension, you also have to use it. 如果为条形码扩展名定义名称空间前缀,则还必须使用它。 Otherwise, Xalan won't find the Java class necessary.
否则,Xalan将找不到必需的Java类。 So, write "barcode:barcode" and not just "barcode".
因此,写下“条形码:条形码”,而不仅仅是“条形码”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.