NoClassDefFoundError:org / kitesdk / morphline / api / MorphlineCompilationException

时间:2016-02-29 12:20:39

标签: apache maven solr

我正在使用MorphlineSolr作为接收器处理Apache Flume。我的flume.conf文件的位置如下:

a1.sinks.k1.type = org.apache.flume.sink.solr.morphline.MorphlineSolrSink
a1.sinks.k1.morphlineFile = /etc/flume-ng/conf/morphline.conf 

运行flume命令后,我得到以下异常:

java.lang.NoClassDefFoundError: org/kitesdk/morphline/api/MorphlineCompilationException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:260)
    at org.apache.flume.sink.solr.morphline.MorphlineSink.start(MorphlineSink.java:93)
    at org.apache.flume.sink.DefaultSinkProcessor.start(DefaultSinkProcessor.java:46)
    at org.apache.flume.SinkRunner.start(SinkRunner.java:79)
    at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

所以我从以下存储库添加了jar文件: http://search.maven.org/#search%7Cga%7C1%7Ckite-morphlines-core

之后它抛出以下异常:

java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.solr.client.solrj.SolrServerException
    at org.kitesdk.morphline.base.FaultTolerance.parseRecoverableExceptionClassNames(FaultTolerance.java:118)
    at org.kitesdk.morphline.base.FaultTolerance.<init>(FaultTolerance.java:56)
    at org.apache.flume.sink.solr.morphline.MorphlineHandlerImpl.configure(MorphlineHandlerImpl.java:89)
    at org.apache.flume.sink.solr.morphline.MorphlineSink.start(MorphlineSink.java:97)
    at org.apache.flume.sink.DefaultSinkProcessor.start(DefaultSinkProcessor.java:46)
    at org.apache.flume.SinkRunner.start(SinkRunner.java:79)
    at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

任何建议都会有很大的帮助..

1 个答案:

答案 0 :(得分:0)

如果您使用自定义应用程序,请使用胖罐。构建一个pom文件并包含库

例如 文件pom.xml(项目的)

组织/阿帕奇/ Solr的/ ** 。 。