在风暴hbase集成期间,在类路径上设置的jar是什么?

时间:2015-04-01 12:55:19

标签: maven jar classpath hbase apache-storm

我正在尝试集成storm和hbase,我的程序被提交到风暴拓扑而没有任何错误或异常但是当我检查日志时我得到java.lang.RuntimeException:java.lang.ClassNotFoundException:org.apache .storm.hbase.bolt.HBaseBolt,我已经将storm-hbase-0.9.3.jar添加到classpath,即风暴lib文件夹仍然在运行时获得异常 -

  

java.lang.RuntimeException:java.lang.ClassNotFoundException:   org.apache.storm.hbase.bolt.HBaseBolt at   backtype.storm.serialization.DefaultSerializationDelegate.deserialize(DefaultSerializationDelegate.java:58)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.utils.Utils.deserialize(Utils.java:89)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.utils.Utils.getSetComponentObject(Utils.java:228)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.daemon.task $ get_task_object.invoke(task.clj:73)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.daemon.task $ mk_task_data $ fn__3131.invoke(task.clj:180)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.util $ assoc_apply_self.invoke(util.clj:850)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.daemon.task $ mk_task_data.invoke(task.clj:173)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.daemon.task $ mk_task.invoke(task.clj:184)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.daemon.executor $ mk_executor $ fn__3310.invoke(executor.clj:323)   〜[storm-core-0.9.3.jar:0.9.3] at   clojure.core $表$ fn__4207.invoke(core.clj:2485)   〜[clojure-1.5.1.jar:na] at clojure.lang.LazySeq.sval(LazySeq.java:42)   〜[clojure-1.5.1.jar:na] at clojure.lang.LazySeq.seq(LazySeq.java:60)   〜[clojure-1.5.1.jar:na] at clojure.lang.RT.seq(RT.java:484)   〜[clojure-1.5.1.jar:na]在clojure.core $ seq.invoke(core.clj:133)   〜[clojure-1.5.1.jar:na] at   clojure.core.protocols $ seq_reduce.invoke(protocols.clj:30)   〜[clojure-1.5.1.jar:na] at   clojure.core.protocols $ fn__6026.invoke(protocols.clj:54)   〜[clojure-1.5.1.jar:na] at   clojure.core.protocols $ fn__5979 $ G__5974__5992.invoke(protocols.clj:13)   〜[clojure-1.5.1.jar:na] at clojure.core $ reduce.invoke(core.clj:6177)   〜[clojure-1.5.1.jar:na]在clojure.core $ into.invoke(core.clj:6229)   〜[clojure-1.5.1.jar:na] at   backtype.storm.daemon.executor $ mk_executor.invoke(executor.clj:323)   〜[storm-core-0.9.3.jar:0.9.3] at   backtype.storm.daemon.worker $ fn__3743 $ exec_fn__1108__auto ____ 3744 $ iter__3749__3753 $ fn__3754.invoke(worker.clj:382)   〜[storm-core-0.9.3.jar:0.9.3] at   clojure.lang.LazySeq.sval(LazySeq.java:42)〜[clojure-1.5.1.jar:na] at   clojure.lang.LazySeq.seq(LazySeq.java:60)〜[clojure-1.5.1.jar:na] at   clojure.lang.RT.seq(RT.java:484)〜[clojure-1.5.1.jar:na] at   clojure.core $ seq.invoke(core.clj:133)〜[clojure-1.5.1.jar:na] at   clojure.core $ dorun.invoke(core.clj:2780)〜[clojure-1.5.1.jar:na] at   clojure.core $ doall.invoke(core.clj:2796)〜[clojure-1.5.1.jar:na] at   backtype.storm.daemon.worker $ fn__3743 $ exec_fn__1108__auto ____ 3744.invoke(worker.clj:382)   〜[storm-core-0.9.3.jar:0.9.3] at   clojure.lang.AFn.applyToHelper(AFn.java:185)[clojure-1.5.1.jar:na]     在clojure.lang.AFn.applyTo(AFn.java:151)[clojure-1.5.1.jar:na] at   clojure.core $ apply.invoke(core.clj:617)〜[clojure-1.5.1.jar:na] at   backtype.storm.daemon.worker $ fn__3743 $ mk_worker__3799.doInvoke(worker.clj:354)   [storm-core-0.9.3.jar:0.9.3] at   clojure.lang.RestFn.invoke(RestFn.java:512)[clojure-1.5.1.jar:na] at   backtype.storm.daemon.worker $ _main.invoke(worker.clj:461)   [storm-core-0.9.3.jar:0.9.3] at   clojure.lang.AFn.applyToHelper(AFn.java:172)[clojure-1.5.1.jar:na]     在clojure.lang.AFn.applyTo(AFn.java:151)[clojure-1.5.1.jar:na] at   backtype.storm.daemon.worker.main(未知来源)   [storm-core-0.9.3.jar:0.9.3]引起:   抛出java.lang.ClassNotFoundException:   org.apache.storm.hbase.bolt.HBaseBolt at   java.net.URLClassLoader $ 1.run(URLClassLoader.java:366)〜[na:1.7.0_72]     在java.net.URLClassLoader $ 1.run(URLClassLoader.java:355)   〜[na:1.7.0_72] java.security.AccessController.doPrivileged(Native   方法)〜[na:1.7.0_72] at   java.net.URLClassLoader.findClass(URLClassLoader.java:354)   〜[na:1.7.0_72] at   java.lang.ClassLoader.loadClass(ClassLoader.java:425)〜[na:1.7.0_72]     at sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:308)   〜[na:1.7.0_72] at   java.lang.ClassLoader.loadClass(ClassLoader.java:358)〜[na:1.7.0_72]     at java.lang.Class.forName0(Native Method)〜[na:1.7.0_72] at   java.lang.Class.forName(Class.java:274)〜[na:1.7.0_72] at   java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:625)   〜[na:1.7.0_72] at   java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)   〜[na:1.7.0_72] at   java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)   〜[na:1.7.0_72] at   java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)   〜[na:1.7.0_72] at   java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)   〜[na:1.7.0_72] at   java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)   〜[na:1.7.0_72] at   backtype.storm.serialization.DefaultSerializationDelegate.deserialize(DefaultSerializationDelegate.java:52)   〜[storm-core-0.9.3.jar:0.9.3] ...省略了36个常用帧   2015-04-01T18:20:13.559 + 0530 b.s.util [ERROR]暂停过程:("错误   on initialization")java.lang.RuntimeException:(" Error on   初始化")at   backtype.storm.util $ exit_process_BANG_.doInvoke(util.clj:325)   [storm-core-0.9.3.jar:0.9.3] at   clojure.lang.RestFn.invoke(RestFn.java:423)[clojure-1.5.1.jar:na] at   backtype.storm.daemon.worker $ fn__3743 $ mk_worker__3799.doInvoke(worker.clj:354)   [storm-core-0.9.3.jar:0.9.3] at   clojure.lang.RestFn.invoke(RestFn.java:512)[clojure-1.5.1.jar:na] at   backtype.storm.daemon.worker $ _main.invoke(worker.clj:461)   [storm-core-0.9.3.jar:0.9.3] at   clojure.lang.AFn.applyToHelper(AFn.java:172)[clojure-1.5.1.jar:na]     在clojure.lang.AFn.applyTo(AFn.java:151)[clojure-1.5.1.jar:na] at   backtype.storm.daemon.worker.main(未知来源)   [风暴芯0.9.3.jar:0.9.3]

任何人都可以告诉我如何解决这个问题,我在classpath中缺少任何jar吗?

1 个答案:

答案 0 :(得分:0)

最后使用插件 -

添加了lib文件夹中pom.xml的所有jar文件
<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>/usr/local/storm/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

一切正常。