java.lang.NoSuchMethodError:com.lmax.disruptor.RingBuffer。<init>

时间:2016-09-28 15:31:55

标签: java maven apache-kafka apache-storm apache-zookeeper

错误是: java.lang.NoSuchMethodError:com.lmax.disruptor.RingBuffer。(Lcom / lmax / disruptor / EventFactory; Lcom / lmax / disruptor / ClaimStrategy; Lcom / lmax / disruptor / WaitStrategy;)V

执行拓扑时出现此奇怪错误。这是 pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"   
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <groupId>com.ts.project</groupId>
    <artifactId>name</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appassembler-maven-plugin</artifactId>
                <version>1.10</version>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <dependencySets>
                        <dependencySet>
                            <excludes>
                                <exclude>org.apache.storm:storm-core</exclude>
                                <exclude>org.slf4j:slf4j-log4j12</exclude>
                            </excludes>
                            <includes>
                                <include>org.apache.storm:storm-kafka</include>
                            </includes>
                        </dependencySet>
                    </dependencySets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <excludes>
                        <exclude>log4j.properties*</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.storm</groupId>
            <artifactId>storm-kafka</artifactId>
            <version>0.9.6</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.0.15.Final</version>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>9.5.0.1</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.12</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.1.3</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.4.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.4.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>2.4.1</version>
        </dependency>
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-core</artifactId>
            <version>2.1.2</version>
        </dependency>
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-mapping</artifactId>
            <version>2.1.9</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>4.10.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.10</artifactId>
            <version>0.8.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.storm</groupId>
            <artifactId>storm-core</artifactId>
            <version>0.9.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20140107</version>
        </dependency>
        <dependency>
            <groupId>org.clojure</groupId>
            <artifactId>clojure</artifactId>
            <version>1.5.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-exec</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.10.19</version>
        </dependency>
        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert-core</artifactId>
            <version>2.0M10</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.11.0</version>
        </dependency>
    </dependencies>
</project>

如果我运行拓扑,我收到此错误:

[2016-09-28 11:13:12,409] INFO State change: CONNECTED (org.apache.storm.curator.framework.state.ConnectionStateManager)
[2016-09-28 11:13:12,414] INFO Reading Assignments. (backtype.storm.daemon.worker)
[2016-09-28 11:13:12,432] ERROR Error on initialization of server mk-worker (backtype.storm.daemon.worker)
**java.lang.NoSuchMethodError: com.lmax.disruptor.RingBuffer.<init>  (Lcom/lmax/disruptor/EventFactory;Lcom/lmax/disruptor/ClaimStrategy;  Lcom/lmax/disruptor/WaitStrategy;)V** 
        at backtype.storm.utils.DisruptorQueue.<init>(DisruptorQueue.java:66)
        at backtype.storm.disruptor$disruptor_queue.doInvoke(disruptor.clj:51)
        at clojure.lang.RestFn.invoke(RestFn.java:464)
        at backtype.storm.daemon.worker$worker_data.invoke(worker.clj:187)
        at backtype.storm.daemon.worker$fn__4629$exec_fn__1104__auto____4630.invoke(worker.clj:400)
        at clojure.lang.AFn.applyToHelper(AFn.java:185)
        at clojure.lang.AFn.applyTo(AFn.java:151)
        at clojure.core$apply.invoke(core.clj:617)
        at backtype.storm.daemon.worker$fn__4629$mk_worker__4685.doInvoke(worker.clj:391)
        at clojure.lang.RestFn.invoke(RestFn.java:512)
        at backtype.storm.daemon.supervisor$fn__5186.invoke(supervisor.clj:620)
        at clojure.lang.MultiFn.invoke(MultiFn.java:241)
        at backtype.storm.daemon.supervisor$sync_processes$iter__5009__5013$fn__5014$fn__5024.invoke(supervisor.clj:305)
        at backtype.storm.daemon.supervisor$sync_processes$iter__5009__5013$fn__5014.invoke(supervisor.clj:295)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.core$seq.invoke(core.clj:133)
        at clojure.core$dorun.invoke(core.clj:2780)
        at clojure.core$doall.invoke(core.clj:2796)
        at backtype.storm.daemon.supervisor$sync_processes.invoke(supervisor.clj:293)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.AFn.applyTo(AFn.java:151)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$partial$fn__4190.doInvoke(core.clj:2396)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at backtype.storm.event$event_manager$fn__2465.invoke(event.clj:40)
        at clojure.lang.AFn.run(AFn.java:24)
        at java.lang.Thread.run(Thread.java:745)
    [2016-09-28 11:13:12,439] ERROR Halting process: ("Error on initialization") (backtype.storm.util)
    java.lang.RuntimeException: ("Error on initialization")
        at backtype.storm.util$exit_process_BANG_.doInvoke(util.clj:325)
        at clojure.lang.RestFn.invoke(RestFn.java:423)
        at backtype.storm.daemon.worker$fn__4629$mk_worker__4685.doInvoke(worker.clj:391)
        at clojure.lang.RestFn.invoke(RestFn.java:512)
        at backtype.storm.daemon.supervisor$fn__5186.invoke(supervisor.clj:620)
        at clojure.lang.MultiFn.invoke(MultiFn.java:241)
        at backtype.storm.daemon.supervisor$sync_processes$iter__5009__5013$fn__5014$fn__5024.invoke(supervisor.clj:305)
        at backtype.storm.daemon.supervisor$sync_processes$iter__5009__5013$fn__5014.invoke(supervisor.clj:295)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.core$seq.invoke(core.clj:133)
        at clojure.core$dorun.invoke(core.clj:2780)
        at clojure.core$doall.invoke(core.clj:2796)
        at backtype.storm.daemon.supervisor$sync_processes.invoke(supervisor.clj:293)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.AFn.applyTo(AFn.java:151)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$partial$fn__4190.doInvoke(core.clj:2396)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at backtype.storm.event$event_manager$fn__2465.invoke(event.clj:40)
        at clojure.lang.AFn.run(AFn.java:24)
        at java.lang.Thread.run(Thread.java:745)

以前工作过。出于某种原因,这个破坏者给了我错误。在我的拓扑中,我只是听kafka主题,并创建了要显示的螺栓。事实上,它甚至没有达到螺栓。请帮忙!

我坚信我的maven依赖项中存在错误。我已经尝试过改变kafka-storm,storm-api的版本。它没有用。实际上,我也尝试添加这种依赖:

<dependency>
        <groupId>com.lmax</groupId>
        <artifactId>disruptor</artifactId>
        <version>3.2.0</version>
</dependency>

但是,这个错误还没有结束。

0 个答案:

没有答案