gpt4 book ai didi

scala - 气泡水滴项目运行问题

转载 作者:行者123 更新时间:2023-11-30 09:37:10 25 4
gpt4 key购买 nike

我从'https://github.com/h2oai/h2o-droplets/tree/master/sparkling-water-droplet克隆了闪闪发光的水滴项目'。并分别使用 ./gradlew clean./gradlew build 清理和构建项目。之后尝试使用命令运行项目
spark-submit --class water.droplets.SparklingWaterDroplet build/libs/sparkling-water-droplet-app.jar
然后收到以下错误消息:

Exception in thread "main" java.lang.NoClassDefFoundError: water/fvec/Frame
at water.droplets.SparklingWaterDroplet.main(SparklingWaterDroplet.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:674)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

Caused by: java.lang.ClassNotFoundException: water.fvec.Frame
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 10 more

最佳答案

您必须运行 ./gradlew ShadowJar 并使用它创建的 jar build/libs/sparkling-water-droplet-app.jar 因为它会创建一个fat jar,其中包含提交作业时所需的所有类(build 任务不会执行此操作)。

关于scala - 气泡水滴项目运行问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35976589/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com