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

来源:互联网 发布:聚宝盆计划软件下载 编辑:程序博客网 时间:2024/05/22 05:06
一句话总结
可能是依赖的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 Found

This 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.

0 0
原创粉丝点击