简体   繁体   English

在IBM Message Broker v8中使用docx4j时出现NoClassDefFoundError

[英]NoClassDefFoundError while using docx4j in IBM message broker v8

I have a requirement to create a word document. 我需要创建一个Word文档。 So I am trying to use docx4j. 所以我正在尝试使用docx4j。 I get a runtime error. 我收到运行时错误。

java.lang.NoClassDefFoundError: org.docx4j.openpackaging.packages.WordprocessingMLPackage

I am sure I have docx4j3.0.1 and all the dependencies added to my build path. 我确定我有docx4j3.0.1,并且所有依赖项都添加到了我的构建路径中。

Is there an issue with the class initialization mechanism? 类初始化机制有问题吗? Any ideas? 有任何想法吗?

Had to add all the jars to the MQSI/shared-classes folder. 必须将所有罐子添加到MQSI / shared-classes文件夹。 That worked. 那行得通。

For future reference a good way to resolve these problems on IBM JRE platforms is to set the environment variable IBM_JAVA_OPTIONS=-Dibm.cl.verbose=* and restart the Broker. 为了将来参考,在IBM JRE平台上解决这些问题的一种好方法是设置环境变量IBM_JAVA_OPTIONS = -Dibm.cl.verbose = *并重新启动Broker。

This will cause classloading trace to be written to Broker's standard output (located in $MQSI_WORKPATH/components// 这将导致类加载跟踪写入到Broker的标准输出(位于$ MQSI_WORKPATH / components //中)

This shows you what jars are available in each classloader and which classloaders are being searched whenever a class is loaded. 这向您显示了每个类加载器中可用的jar,以及在加载类时正在搜索哪些类加载器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM