【问题标题】:Crawler4J does not detect encoding with Tika with sbt-assembly in FatJarCrawler4J 在 FatJar 中没有检测到带有 sbt-assembly 的 Tika 编码
【发布时间】:2017-05-23 14:10:27
【问题描述】:

在 sbt 控制台中使用 Crawler4j 有效。当使用 sbt-assembly 创建 fatjar Tika (?) 开始时似乎不再能够检测页面编码

 java -jar crawler.jar

Tika 缺少什么来检测编码?

ERROR edu.uci.ics.crawler4j.parser.Parser - Failed to detect the character
encoding of a document, while parsing

合并策略是

assemblyMergeStrategy in assembly := {
  case PathList("META-INF", xs @ _*) => MergeStrategy.discard
  case _ => MergeStrategy.first
}

【问题讨论】:

    标签: apache-tika crawler4j


    【解决方案1】:

    删除了合并策略,现在可以使用标准策略。从一个不好的例子中得到那个。

    【讨论】:

      猜你喜欢
      • 2016-06-07
      • 1970-01-01
      • 2018-04-16
      • 1970-01-01
      • 2018-08-22
      • 2015-10-04
      • 2013-12-27
      • 2020-05-17
      • 1970-01-01
      相关资源
      最近更新 更多