2014-02-26 4 views
0

Barcode4j 및 FOP를 사용하여 바코드가 포함 된 PDF를 생성하고 있습니다. 그것은 내 이클립스 지역 환경에 완벽하게 작동 하지만, 웹 로직을 배포하고 웹을 통해 기능을 액세스 한 후 나는 다음과 같은 오류 얻을 :Barcode4j에서 바코드 오류가 발생합니다.

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"> 

바코드 :

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.' FATAL ERROR: 'Could not compile stylesheet'

이 스타일 시트의 섹션이를 세대 :

<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)" /> 

jdk 1.5.0_22, xalan-2.7.0, fop 1.1을 사용하고 있습니다.

도움이 되겠습니다.

답변

0

바코드 확장에 대한 네임 스페이스 접두사를 정의하는 경우에도 사용해야합니다. 그렇지 않으면 Xalan은 필요한 Java 클래스를 찾지 못합니다. 따라서 "바코드"가 아닌 "바코드 : 바코드"라고 적으십시오.

관련 문제