intellij中生成的scala jar在cdsw中不工作-error(object predef没有成员classof)

qlvxas9a  于 2021-05-27  发布在  Spark
关注(0)|答案(0)|浏览(307)

我在让intellij生成的scala jar在cdsw上运行时遇到了问题
例如,我在intellij2019中有一个简单的scala idea项目,它是一个简单的“helloworld”程序,构建和运行都很好。我已经生成了一个jar,并附加了scala和spark依赖项。当我在windows机器上运行这个jar时,它运行得很好。但是,当我尝试使用command:-%addjar file:explore.jar -f
我得到以下错误。有什么想法我可以解决这个问题,因为我需要能够生成jar和上传,并从cdsw运行它们?我已经包括了一个图像的人工制品建立从intellij
scala.reflect.internal.fatalerror:对象predef没有scala.reflect.internal.definitions$definitionsclass.scala$reflect$internal$definitions$definitionsclass$$fatalmissingsymbol(定义)的成员类。scala:1186)scala.reflect.internal.definitions$definitionsclass.getmember(定义。scala:1203) scala.reflect.internal.definitions$definitionsclass.getmembermethod(定义。scala:1238)scala.reflect.internal.definitions$definitionsclass$rundefinitions.predef\u$lzycompute(定义)的类。scala:1469)scala.reflect.internal.definitions$definitionsclass$rundefinitions.predef\u classof(定义。scala:1469) scala.reflect.internal.definitions$definitionsclass$rundefinitions.ispredefclassof(定义)。scala:1459)scala.tools.nsc.typechecker.typers$typer.typedident$2(typers。scala:4885)scala.tools.nsc.typechecker.typers$typer.typedidentorwildcard$1(typers。scala:4908)scala.tools.nsc.typechecker.typers$typer.typedinanymode$1(typers。scala:5340) scala.tools.nsc.typechecker.typers$typer.typed1(typers。scala:5360)scala.tools.nsc.typechecker.typers$typer.runtyper$1(typers。scala:5396)scala.tools.nsc.typechecker.typers$typer.scala$tools$nsc$typechecker$typers$typers$$typedinternal(打字机)。scala:5423)scala.tools.nsc.typechecker.typers$typer.body$2(typers。scala:5370) scala.tools.nsc.typechecker.typers$typer.typed(typers。scala:5374)scala.tools.nsc.interpreter.replglobal$$anon$1$$anon$2.typed(replglobal。scala:36)scala.tools.nsc.typechecker.typers$typer.typedqualifier(typers。scala:5472)scala.tools.nsc.typechecker.typers$typer.typedqualifier(typers。scala:5480) scala.tools.nsc.typechecker.typers$typer.typedpackagedef$1(typers。scala:5012)scala.tools.nsc.typechecker.typers$typer.typedmemberdef$1(typers。scala:5312)scala.tools.nsc.typechecker.typers$typer.typed1(typers。scala:5359)scala.tools.nsc.typechecker.typers$typer.runtyper$1(typers。scala:5396) scala.tools.nsc.typechecker.typers$typer.scala$tools$nsc$typechecker$typers$typers$$typedinternal(打字机)。scala:5423)scala.tools.nsc.typechecker.typers$typer.body$2(typers。scala:5370)scala.tools.nsc.typechecker.typers$typer.typed(typers。scala:5374)scala.tools.nsc.interpreter.replglobal$$anon$1$$anon$2.typed(replglobal。scala:36) scala.tools.nsc.typechecker.typers$typer.typed(typers。scala:5448)scala.tools.nsc.typechecker.analyzer$typerfactory$$anon$3.apply(analyzer。scala:102)scala.tools.nsc.global$globalphase$$anonfun$applyphase$1.apply$mcv$sp(全局)。scala:440)scala.tools.nsc.global$globalphase.withcurrentunit(全局。scala:431) scala.tools.nsc.global$globalphase.applyphase(全局。scala:440)scala.tools.nsc.typechecker.analyzer$typerfactory$$anon$3$$anonfun$run$1.apply(analyzer。scala:94)scala.tools.nsc.typechecker.analyzer$typerfactory$$anon$3$$anonfun$run$1.apply(analyzer。scala:93)scala.collection.iterator$class.foreach(迭代器。scala:893) scala.collection.abstractiterator.foreach(迭代器。scala:1336)scala.tools.nsc.typechecker.analyzer$typerfactory$$anon$3.run(analyzer。scala:93)scala.tools.nsc.global$run.compileunitsinternal(全局。scala:1501)scala.tools.nsc.global$run.compileunits(全局。scala:1486)scala.tools.nsc.global$run.compilesources(全局。scala:1481) scala.tools.nsc.interpreter.imain.compileSourceKeepingRun(imain。scala:435)scala.tools.nsc.interpreter.imain$readevalprint.compileandsaverun(imain。scala:855)scala.tools.nsc.interpreter.imain$readevalprint.compile(imain。scala:813)scala.tools.nsc.interpreter.imain.bind(imain。scala:675)scala.tools.nsc.interpreter.imain.bind(imain。scala:712) scala.tools.nsc.interpreter.imain$$anonfun$quietbind$1.apply(imain。scala:711)scala.tools.nsc.interpreter.imain$$anonfun$quietbind$1.apply(imain。scala:711)scala.tools.nsc.interpreter.imain.bequietduring(imain。scala:214)scala.tools.nsc.interpreter.imain.quietbind(imain。scala:711)scala.tools.nsc.interpreter.imain.compiled(imain。scala:587) scala.tools.nsc.interpreter.imain.eval(imain。scala:1074)javax.script.abstractscriptengine.eval(abstractscriptengine。java:264)org.apache.toree.kernel.interpreter.scala.scalainterpreterspecific$class.read(scalainterpreterspecific。scala:262)org.apache.toree.kernel.interpreter.scala.scalainterpreter.read(scalainterpreter。scala:44) org.apache.toree.kernel.protocol.v5.magic.postprocessor$$anonfun$1.apply(后处理器。scala:29)org.apache.toree.kernel.protocol.v5.magic.postprocessor$$anonfun$1.apply(后处理器。scala:29)scala.option.flatmap(选项。scala:171)org.apache.toree.kernel.protocol.v5.magic.postprocessor.process(后处理器)。scala:29) org.apache.toree.kernel.protocol.v5.relay.executerequestrelay$$anonfun$org$apache$toree$kernel$protocol$v5$relay$executerequestrelay$$packagefutureresponse$1.apply(executerequestrelay)。scala:80) org.apache.toree.kernel.protocol.v5.relay.executerequestrelay$$anonfun$org$apache$toree$kernel$protocol$v5$relay$executerequestrelay$$packagefutureresponse$1.apply(executerequestrelay)。scala:77)scala.util.success$$anonfun$map$1.apply(请尝试。scala:237)scala.util.try$.apply(try。scala:192)scala.util.success.map(试试。scala:237) scala.concurrent.future$$anonfun$map$1.apply(未来。scala:237)scala.concurrent.future$$anonfun$map$1.apply(未来。scala:237)scala.concurrent.impl.callbackrunnable.run(承诺。scala:32)akka.dispatch.batchingexecutor$batch$$anonfun$运行$1.processbatch$1(batchingexecutor。scala:67) akka.dispatch.batchingexecutor$batch$$anonfun$运行$1。应用$mcv$sp(batchingexecutor。scala:82)akka.dispatch.batchingexecutor$batch$$anonfun$运行$1.apply(batchingexecutor。scala:59)akka.dispatch.batchingexecutor$batch$$anonfun$运行$1.apply(batchingexecutor。scala:59)scala.concurrent.blockcontext$.withblockcontext(blockcontext)。scala:72) akka.dispatch.batchingexecutor$batch.run(batchingexecutor。scala:58)akka.dispatch.taskinvocation.run(abstractdispatcher。scala:41)akka.dispatch.forkjoinexecutorconfigurator$akkaforkjointask.exec(抽象调度器。scala:393)scala.concurrent.forkjoin.forkjointask.doexec(forkjointask。java:260) scala.concurrent.forkjoin.forkjoinpool$workqueue.runtask(forkjoinpool。java:1339)scala.concurrent.forkjoin.forkjoinpool.runworker(forkjoinpool。java:1979)scala.concurrent.forkjoin.forkjoinworkerthread.run(forkjoinworkerthread。java:107)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题