3

我的要求是嵌入一个带有条形码的 Word.doc 文件,然后将其转换为 PDF。我正在为这个项目尝试docmosis,到目前为止它一直有效 - 除非我尝试生成启用了条形码的pdf。我收到以下错误,我猜这是缺少依赖项,我希望有人可以为我识别。

这就是我启动 Docmosis 服务的方式:

java -jar  docmosisTornado2.3.war -classpath ..\barcode4j-2.1.0\build\barcode4j.jar

这是我回来的错误:

Exception in thread "ODFExplodedTemplatePopulator10987705" java.lang.NoClassDefFoundError: org/krysalis/barcode4j/impl/AbstractBarco
deBean
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at com.docmosis.template.analysis.barcode.BarcodeGeneratorFactory$_A.A(line:64)
        at com.docmosis.template.analysis.barcode.BarcodeGeneratorFactory$_A.access$0(line:59)
        at com.docmosis.template.analysis.barcode.BarcodeGeneratorFactory.getGenerator(line:39)
        at com.docmosis.template.population.openoffice.PopulationContext.getImage(line:495)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:2590)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.access$1(line:2581)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl$2.A(line:1569)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:1539)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:2781)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:1124)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:481)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:942)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:481)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:1127)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:481)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:1127)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:481)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:516)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:481)
        at com.docmosis.template.population.openoffice.ContentStreamPopulatorObfImpl.A(line:384)
        at com.docmosis.template.population.openoffice.ODFExplodedTemplatePopulator.processContent(line:203)
        at com.docmosis.template.population.openoffice.ODFExplodedTemplatePopulator.processTask(line:113)
        at com.docmosis.util.pipeline.impl.AbstractDataWorker.run(line:129)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.krysalis.barcode4j.impl.AbstractBarcodeBean
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1854)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1703)
        ... 26 more
4

1 回答 1

1

此错误表明barcode4j类不可用。对于Docmosis-java,将barcode4j.jar 添加到您的类路径中。如果您使用的是 Docmosis Tornado,则需要等待下一个版本。

Docmosis基于barcode4j 支持条形码code39code128itf14 。如果您将barcode4j.jar 添加到您的类路径 ,它默认在Docmosis Cloud(互联网上的REST API)和Docmosis-Java (Java API)中可用。Docmosis Tornado(本地 Web 服务器的 REST API)预计将在 2.4 版中包含它。

于 2016-05-05T09:12:22.467 回答