sryza / aas

Code to accompany Advanced Analytics with Spark from O'Reilly Media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java.lang.NoClassDefFoundError: scala/reflect/internal/Trees

hc27080401 opened this issue · comments

system:windows 10 x64
idea:2018.1.2
maven:3.5.3
scala sdk:2.11.12
jdk:1.8.0_172

when i run mvn package From the root level of the project,it failed:

[ERROR] java.lang.NoClassDefFoundError: scala/reflect/internal/Trees
[INFO] at java.lang.Class.getDeclaredMethods0(Native Method)
[INFO] at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
[INFO] at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
[INFO] at java.lang.Class.getMethod0(Class.java:3018)
[INFO] at java.lang.Class.getMethod(Class.java:1784)
[INFO] at scala_maven_executions.MainHelper.runMain(MainHelper.java:155)
[INFO] at scala_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)

Hm, I don't see that locally and haven't seen that one before. The automated builds also seem fine. The only difference I can see here is Windows, but I don't know why that would make a difference. scala-reflect is a direct dependency and should be added by mvn already.

Try deleting your ~./m2 or ~/.ivy dirs and try again? or at least all the artifacts downloaded for scala? very occasionally some artifact doesn't get correctly downloaded and you can get things like this.