ElasticSearch中的摄取附件插件出错(NoClassDefFoundError)

时间:2017-02-01 18:04:09

标签: elasticsearch logstash elasticsearch-plugin

我正在尝试使用Logstash将数据放入ES我收到此错误,我使用的是ingest_attachment插件:

  

java.lang.NoClassDefFoundError:org / apache / james / mime4j / codec / DecodeMonitor           在org.apache.tika.parser.microsoft.OutlookExtractor.decodeHeader(OutlookExtractor.java:349)〜[?:?]           在org.apache.tika.parser.microsoft.OutlookExtractor.normalizeHeaders(OutlookExtractor.java:315)〜[?:?]           在org.apache.tika.parser.microsoft.OutlookExtractor.parse(OutlookExtractor.java:140)〜[?:?]           在org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:193)〜[?:?]           在org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:130)〜[?:?]           在org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)〜[?:?]           在org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)〜[?:?]           在org.apache.tika.Tika.parseToString(Tika.java:568)〜[?:?]           在org.elasticsearch.ingest.attachment.TikaImpl $ 1.run(TikaImpl.java:94)〜[?:?]           在org.elasticsearch.ingest.attachment.TikaImpl $ 1.run(TikaImpl.java:91)〜[?:?]           at java.security.AccessController.doPrivileged(Native Method)〜[?:1.8.0_121]           在org.elasticsearch.ingest.attachment.TikaImpl.parse(TikaImpl.java:91)〜[?:?]           在org.elasticsearch.ingest.attachment.AttachmentProcessor.execute(AttachmentProcessor.java:86)〜[?:?]           在org.elasticsearch.ingest.CompoundProcessor.execute(CompoundProcessor.java:100)〜[elasticsearch-5.2.0.jar:5.2.0]           在org.elasticsearch.ingest.Pipeline.execute(Pipeline.java:58)〜[elasticsearch-5.2.0.jar:5.2.0]           在org.elasticsearch.ingest.PipelineExecutionService.innerExecute(PipelineExecutionService.java:166)〜[elasticsearch-5.2.0.jar:5.2.0]           在org.elasticsearch.ingest.PipelineExecutionService.access $ 000(PipelineExecutionService.java:41)〜[elasticsearch-5.2.0.jar:5.2.0]           在org.elasticsearch.ingest.PipelineExecutionService $ 2.doRun(PipelineExecutionService.java:88)〜[elasticsearch-5.2.0.jar:5.2.0]           在org.elasticsearch.common.util.concurrent.ThreadContext $ ContextPreservingAbstractRunnable.doRun(ThreadContext.java:596)〜[elasticsearch-5.2.0.jar:5.2.0]           在org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)〜[elasticsearch-5.2.0.jar:5.2.0]           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)〜[?:1.8.0_121]           在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)〜[?:1.8.0_121]           在java.lang.Thread.run(Thread.java:745)[?:1.8.0_121]   引起:java.lang.ClassNotFoundException:org.apache.james.mime4j.codec.DecodeMonitor           在java.net.URLClassLoader.findClass(URLClassLoader.java:381)〜[?:1.8.0_121]           在java.lang.ClassLoader.loadClass(ClassLoader.java:424)〜[?:1.8.0_121]           在java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)〜[?:1.8.0_121]           在java.lang.ClassLoader.loadClass(ClassLoader.java:357)〜[?:1.8.0_121]           ......还有23个

我尝试编制索引的格式为:

.URL 。一个 .ans .ASC 的.ascx .ASM 的.asp 的.aspx 的.asx .BAS 。蝙蝠 的.bcp 。C .CC .CLS .CMD 的.cpp 的.cs .csa 的.csproj 的CSS 的.csv .CXX .dbs .DEF .DIC .DOC .DOCM .DOCX .DOS 。点 .DOTX .DSP .DSW .dwfx .easmx .edrwx .eprtx .EXT 。常问问题 .fky 。H .hhc .HPP 名.hta 热媒 html的 的.htt .htw .htx .HXX 。一世 .ibq 的.ics 的.idl .idq 。公司 的.inf 的.ini .INL .INX .jav 的.java .jnt .js文件 .jtx .kci .lgn .LOG .LST m3u格式 .MAK 的.mht .mhtml .mk 。味精 .obd .obt 的.odc .odh .ODL 的.odp .ods档案 的.odt 。一 .p7m .PDF .pkgdef .pkgundef 特等 。锅 .PPS .PPT .PPTM .PPTX .PRC .RC .RC2 .rct 的.reg .RGS .RTF .rul .S .scc .SHTM 的.shtml 是.snippet 名为.sol .SOR .SQL .SRF .STM 。标签 .tdl .tlh .tli .trg 。文本 .udf .udt 的.url 。用户 .USR 的.vb .vbproj .VBS 的.vcproj .vdw .VDX .viw .vsct .VSD .vsdm .vsdx .vsixlangpack .vsixmanifest .vspscc .VSS .vsscc .vssm .vssscc .vssx .VST .vstm .vstx .vsx .vtx .wiq 扩展名为wri 将.wtx .xlb .xlc 的.xls .xlsb .XLSM .XLSX 名为.xlt .XML .XPS 的.xsd 的.xsl .xslt 的.zip

1 个答案:

答案 0 :(得分:0)

我已经通过在elasticsearch lib文件夹下添加jar文件来修复此问题。

http://www.java2s.com/Code/Jar/a/Downloadapachemime4jcore072jar.htm