您的位置:首页 > 其它

Scala.runtime In Compiler Mirror Not Found 怎么解决

2016-04-02 04:06 281 查看
一句话总结
可能是依赖的jar文件出错
用 -Ylog-classpath 参数打印依赖的jar
Building with 2.10 I get the following error. It's a Maven build but I see people getting this error with SBT, so I don't think it's a Maven problem.I've tried including dependencies for scala-reflect and scala-library, Maven options -e and -X, scalac options -g:vars -verbose -explaintypes. Nothing gives me more clues about the zip file that failed to open. What is a compiler mirror?[INFO] Compiling 204 Scala sources and 9 Java sources to /Users/garystruthers/git/incubator-spark/core/target/scala-2.10/classes...[ERROR] error while loading , error in opening zip file[INFO] ------------------------------------------------------------------------[INFO] Reactor Summary:[INFO][INFO] Spark Project Parent POM .......................... SUCCESS [1.120s][INFO] Spark Project Core ................................ FAILURE [15.817s]…..[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.1.0:compile (scala-compile-first) on project spark-core: wrap: scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.解决方案:Replies for : Scala.runtime In Compiler Mirror Not FoundThis error is very misleading, it actually has nothing to do with scala.runtime or the compiler mirror: this is the error you get when you have a faulty JAR file on your classpath.Sadly, there is no way from the error (even with -Ydebug) to tell exactly which file. You can run scala with -Ylog-classpath, it will output a lot of classpath stuff, including the exact classpath used (look for "[init] [search path for class files:"). Then I guess you will have to go through them to check if they are valid or not.I recently tried to improve that (SI-5463), at least to get a clear error message, but couldn't find a satisfyingly clean way to do this...I hope this helps,-- Antoine- show quoted text -- show quoted text ---You received this message because you are subscribed to the Google Groups "scala-user" group.To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.For more options, visit https://groups.google.com/groups/opt_out.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: