运行我的程序会导致java.lang.NoSuchMethodError:scala.Predef $ .augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps; [英] Running my program leads to java.lang.NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;

查看:703
本文介绍了运行我的程序会导致java.lang.NoSuchMethodError:scala.Predef $ .augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行一个名为LinkedIn Norbert( https://github.com/linkedin/Norcal )在Scala 2.8.1中.我已经添加了所有jar文件,因此可以编译程序,但是当我尝试在examples/src/main/java中运行com.linkedin.norbert.javacompat.network.RunNorbertSetup类时,出现以下错误:

I am trying to run an open-source program called LinkedIn Norbert (https://github.com/linkedin/norbert) in Scala 2.8.1. I have added all the jar files so the program compiles, but when I try to run class com.linkedin.norbert.javacompat.network.RunNorbertSetup in examples/src/main/java, I get the following error:

Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;
    at com.linkedin.norbert.jmx.JMX$.name(JMX.scala:59)
    at com.linkedin.norbert.cluster.ClusterClient$$anon$1.<init>(ClusterClient.scala:56)
    at com.linkedin.norbert.cluster.ClusterClient$class.$init$(ClusterClient.scala:55)
    at com.linkedin.norbert.cluster.zookeeper.ZooKeeperClusterClient.<init>(ZooKeeperClusterClient.scala:22)
    at com.linkedin.norbert.cluster.ClusterClient$.apply(ClusterClient.scala:33)
    at com.linkedin.norbert.javacompat.cluster.ZooKeeperClusterClient.<init>(ZooKeeperClusterClient.scala:23)
    at com.linkedin.norbert.javacompat.cluster.ZooKeeperClusterClient.<init>(ZooKeeperClusterClient.scala:21)
    at com.linkedin.norbert.javacompat.network.RunNorbertSetup.configCluster(RunNorbertSetup.java:115)
    at com.linkedin.norbert.javacompat.network.RunNorbertSetup.main(RunNorbertSetup.java:21)

我要怎么做才能克服这个错误?我查看了其他Stack Overflow和论坛线程,但这些都无济于事.

What would I need to do to get past this error? I've looked at other Stack Overflow and forum threads, and these have not helped.

仅供参考:我使用SBT构建了该程序.

FYI: I built the program with SBT.

非常感谢, 丽贝卡

推荐答案

解决方案是将相关类放在类路径中.

The solution was to put the relevant class in the classpath.

这篇关于运行我的程序会导致java.lang.NoSuchMethodError:scala.Predef $ .augmentString(Ljava/lang/String;)Lscala/collection/immutable/StringOps;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆