简体   繁体   English

JBoss NoClassDefFoundError内部的docx4j

[英]docx4j inside JBoss NoClassDefFoundError

I get following error when executing on jboss : 在jboss上执行时,出现以下错误:

WordprocessingMLPackage template = WordprocessingMLPackage .load(new FileInputStream(new File(name)));

  • Java version: 1.7.0_25 Java版本:1.7.0_25
  • JBoss version: 7.1.1.Final JBoss版本:7.1.1.Final
  • docx4j version: 2.8.1 docx4j版本:2.8.1

Error: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Context 错误: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Context

I know there is already a question regarding this issue, but no answer was given and seems like the question was left behind. 我知道有关此问题已经存在一个问题,但是没有给出任何答案,似乎这个问题被遗忘了。

Please see my new answer at Cannot use docx4j inside of JBoss 7 请在无法在JBoss 7内使用docx4j上查看我的新答案

My test used same version of JBoss (7.1.1) but: 我的测试使用了相同版本的JBoss(7.1.1),但:

  • old Java (1.6.0_27) 旧的Java(1.6.0_27)
  • newer docx4j (current nightly) 较新的docx4j(当前每晚)

I don't think those differences should matter though. 我认为这些差异并不重要。

With this config, it is safe to ignore the log message java.lang.ClassNotFoundException: com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper 使用此配置,可以安全地忽略日志消息java.lang.ClassNotFoundException:com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper

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

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