【问题标题】:Exception: No such property: level for class: org.slf4j.impl.Slf4jLogger例外:没有这样的属性:类的级别:org.slf4j.impl.Slf4jLogger
【发布时间】:2014-05-30 09:45:38
【问题描述】:

docx4j 从 2.8.0 更新到 3.1.0 后,出现以下代码问题:

WordprocessingMLPackage wml = WordprocessingMLPackage.load(new File(preferenceService.getLocalTemplateDir(), profileVO.templateFile + ".docx"));
/**
some codes for processing the file here...
*/

wml.save(targetFile);

这些代码在 2.8.0 版本中运行良好,但在 3.1.0 中,当调用 wml.save(targetFile) 行时出现异常。我无法进入此代码,因为在进入之前我立即收到以下异常:

Message: No such property: level for class: org.slf4j.impl.Slf4jLogger

我使用 1.7.7 版本的 slf4j-api(对于 docx4j 3.1.0 是 slf4j-api 的 1.7.5 作为标准依赖项)和 1.7.5 版本的 slf4j-log4j12。

我现在能做什么,因为我不能进入这个方法并立即得到异常?这个例外是什么意思?谢谢!

【问题讨论】:

    标签: slf4j docx4j


    【解决方案1】:

    问题解决了!

    新版docx4j使用了新的日志包。它没有属性“级别”。所以我只需要重写使用“级别”的行!

    【讨论】:

      猜你喜欢
      • 2016-08-28
      • 1970-01-01
      • 1970-01-01
      • 2014-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-11
      • 2013-01-16
      相关资源
      最近更新 更多